|
本帖最后由 kk阿朗 于 2009-4-20 10:56 编辑
关于上次我发的那个插件,是不是原创,我都懒得去理了!
你们爱咋说就咋说!这个是你们的言论自由!
这次我还是那样!只发源码!
单机试过,应该没什么BUG!
如果有什么BUG,请与我联系,个性签名有QQ!!!
可能很早就有了,但是具体的源码一不一样,有待大家确认!
再一次强调,本插件只提供大家学习,没有其它什么用意!- #include <amxmodx>
- #include <amxmisc>
- #include <cstrike>
- #define PLUGIN_NAME "admins_models"
- #define PLUGIN_VERSION "1.0"
- #define PLUGIN_AUTHOR "K.K.Lv"
- public plugin_init()
- {
- register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
-
- register_event("ResetHUD", "setModel", "b")
- }
- public plugin_precache() //the Models required
- {
- precache_model("models/player/admin_ct/admin_ct.mdl")
- precache_model("models/player/admin_te/admin_te.mdl")
- precache_model("models/player/admin_vip_ct/admin_vip_ct.mdl")
- precache_model("models/player/admin_vip_te/admin_vip_te.mdl")
-
- return PLUGIN_CONTINUE
- }
- public setModel(id)
- {
- new CsTeams:userTeam = cs_get_user_team(id)
- if ((get_user_flags(id) & ADMIN_IMMUNITY)) //when a player become a OP, server will change his clothes.
- {
- if (userTeam == CS_TEAM_CT)
- {
- cs_set_user_model(id, "admin_ct") //the CT OP.
- }
- else if (userTeam == CS_TEAM_T)
- {
- cs_set_user_model(id, "admin_te") //the TE OP.
- }
- else
- {
- cs_reset_user_model(id)
- }
- }
- else if ((get_user_flags(id) & ADMIN_RESERVATION) && !(get_user_flags(id) & ADMIN_IMMUNITY)) //if some one is a VIP, when his put into the server, his clothes will be changed.
- {
- if (userTeam == CS_TEAM_CT)
- {
- cs_set_user_model(id, "admin_vip_ct") // the CT VIP.
- }
- else if (userTeam == CS_TEAM_T)
- {
- cs_set_user_model(id, "admin_vip_te") // the TE VIP.
- }
- else
- {
- cs_reset_user_model(id)
- }
- }
- return PLUGIN_CONTINUE
- }
复制代码 人物模型是我随便找的!自己可以改!! |
|