|
- #include <amxmodx>
- #include <amxmisc>
- #include <cstrike>
- public plugin_init() {
- register_plugin("AMX Admin Model", "1.1.1", "whitemike")
- register_event("ResetHUD", "resetModel", "b")
- return PLUGIN_CONTINUE
- }
- public plugin_precache() {
- precache_model("models/player/OP_ct/OP_ct.mdl")
- precache_model("models/player/OP_te/OP_te.mdl")
- precache_model("models/player/VIP_ct/VIP_ct.mdl")
- precache_model("models/player/VIP_te/VIP_te.mdl")
- return PLUGIN_CONTINUE
- }
- public resetModel(id, level, cid) {
- if (!is_user_connected(id)) return PLUGIN_CONTINUE
- new flags = get_user_flags(id)
- new CsTeams:userTeam = cs_get_user_team(id)
- if (flags & ADMIN_IMMUNITY){
- if (userTeam == CS_TEAM_T)
- cs_set_user_model(id, "OP_te")
- else if(userTeam == CS_TEAM_CT)
- cs_set_user_model(id, "OP_ct")
- else
- cs_reset_user_model(id)
- }else if (flags & ADMIN_RESERVATION) {
- if (userTeam == CS_TEAM_T)
- cs_set_user_model(id, "VIP_te")
- else if(userTeam == CS_TEAM_CT)
- cs_set_user_model(id, "VIP_ct")
- else
- cs_reset_user_model(id)
- }
- return PLUGIN_CONTINUE
- }
复制代码 上面这段代码如何修改成DOD可用的!谢谢各位帮忙! |
|