Advertisement
seroff

Admin Model 1.0Beta By Seroff

Nov 24th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <fm_cstrike>
  3.  
  4. #define ADM_FLAG ADMIN_BAN
  5.  
  6. new szModels[][]={"models/users/admin_ct/admin_ct.mdl","models/users/admin_te/admin_te.mdl"},PLUGIN[][]={"Admin Model","1.0Beta","Seroff"};
  7.  
  8. public plugin_init() {
  9. register_plugin(PLUGIN[0], PLUGIN[1], PLUGIN[2]);
  10. register_forward( FM_Spawn, "szSpawn",1);
  11. register_event("ResetHUD", "stModel", "b");
  12. }
  13.  
  14. public plugin_precache(){
  15. for(new i;i<charsmax(szModels);i++){
  16. precache_model(szModels[i]);
  17. }
  18. }
  19.  
  20. public szSpawn(id){
  21. set_task(1.0, "stModel", id);
  22. return PLUGIN_HANDLED;
  23. }
  24.  
  25. public stModel(id){
  26. if(get_user_flags(id) & ADM_FLAG && is_user_alive(id)){
  27. switch(fm_cs_get_user_team(id)){
  28. case CS_TEAM_T:{
  29. fm_cs_set_user_model(id, "admin_te");
  30. }
  31. case CS_TEAM_CT:{
  32. fm_cs_set_user_model(id, "admin_ct");
  33. }
  34. }
  35. }
  36. return PLUGIN_HANDLED
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement