Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #define P "Admin Model"
- #define V "1.0"
- #define A ".ThePro"
- #define HOMEM_ACCESS ADMIN_LEVEL_G /* FLAG: S */
- #define MULHER_ACCESS ADMIN_LEVEL_H /* FLAG: T */
- public plugin_init()
- {
- register_plugin(P, V, A)
- register_event("ResetHUD", "ADMIN_H_M", "b")
- return PLUGIN_CONTINUE
- }
- public plugin_precache()
- {
- precache_model("models/player/admin_tr/admin_tr.mdl")
- precache_model("models/player/admin_ct/admin_ct.mdl")
- precache_model("models/player/admin_girl_tr/admin_girl_tr.mdl")
- precache_model("models/player/admin_girl_ct/admin_girl_ct.mdl")
- }
- public ADMIN_H_M(id)
- {
- new CsTeams:userTeam = cs_get_user_team(id)
- if (get_user_flags(id) & HOMEM_ACCESS)
- {
- if (userTeam == CS_TEAM_T)
- cs_set_user_model(id, "admin_tr")
- else if(userTeam == CS_TEAM_CT)
- cs_set_user_model(id, "admin_ct")
- else
- cs_reset_user_model(id)
- }
- else if (get_user_flags(id) & MULHER_ACCESS)
- {
- if (userTeam == CS_TEAM_T)
- cs_set_user_model(id, "admin_girl_tr")
- else if(userTeam == CS_TEAM_CT)
- cs_set_user_model(id, "admin_girl_ct")
- else
- cs_reset_user_model(id)
- }
- return PLUGIN_CONTINUE
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement