daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define P "Admin Model"
  5. #define V "1.0"
  6. #define A ".ThePro"
  7.  
  8. #define HOMEM_ACCESS ADMIN_LEVEL_G /* FLAG: S */
  9. #define MULHER_ACCESS ADMIN_LEVEL_H /* FLAG: T */
  10.  
  11. public plugin_init()
  12. {
  13.     register_plugin(P, V, A)
  14.    
  15.     register_event("ResetHUD", "ADMIN_H_M", "b")
  16.    
  17.     return PLUGIN_CONTINUE
  18. }
  19.  
  20. public plugin_precache()
  21. {
  22.     precache_model("models/player/admin_tr/admin_tr.mdl")
  23.     precache_model("models/player/admin_ct/admin_ct.mdl")
  24.    
  25.     precache_model("models/player/admin_girl_tr/admin_girl_tr.mdl")
  26.     precache_model("models/player/admin_girl_ct/admin_girl_ct.mdl")
  27. }
  28.  
  29. public ADMIN_H_M(id)
  30. {
  31.     new CsTeams:userTeam = cs_get_user_team(id)
  32.    
  33.     if (get_user_flags(id) & HOMEM_ACCESS)
  34.     {      
  35.         if (userTeam == CS_TEAM_T)
  36.             cs_set_user_model(id, "admin_tr")
  37.            
  38.         else if(userTeam == CS_TEAM_CT)
  39.             cs_set_user_model(id, "admin_ct")
  40.            
  41.         else
  42.             cs_reset_user_model(id)
  43.     }
  44.     else if (get_user_flags(id) & MULHER_ACCESS)
  45.     {
  46.         if (userTeam == CS_TEAM_T)
  47.             cs_set_user_model(id, "admin_girl_tr")
  48.            
  49.         else if(userTeam == CS_TEAM_CT)
  50.             cs_set_user_model(id, "admin_girl_ct")
  51.            
  52.         else
  53.             cs_reset_user_model(id)
  54.     }
  55.  
  56.         return PLUGIN_CONTINUE
  57. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top