Advertisement
m1re

vipmodel

Dec 31st, 2014
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <cstrike>
  4.  
  5. #define PLUGIN "Plugin Name"
  6. #define VERSION "v0.1"
  7. #define AUTHOR "Author"
  8.  
  9. new T_MODEL[] = "models/player/vipt/vipt.mdl";
  10. new CT_MODEL[] = "models/player/vipct/vipct.mdl";
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR);
  15.  
  16. RegisterHam(Ham_Spawn, "player", "hamPlayerSpawn_Post", 1);
  17. }
  18.  
  19. public plugin_precache()
  20. {
  21. new id = read_data( 2 );
  22.  
  23. if(get_user_flags(id) & ADMIN_LEVEL_H)
  24. {
  25. precache_model(T_MODEL);
  26. precache_model(CT_MODEL);
  27. }
  28. }
  29. public hamPlayerSpawn_Post(id)
  30. {
  31. if(!is_user_alive(id))
  32. return HAM_IGNORED;
  33.  
  34. if(get_user_flags(id) & ADMIN_LEVEL_H)
  35. {
  36. switch(get_user_team(id))
  37. {
  38. case 1:
  39. cs_set_user_model(id, "vipt");
  40. case 2:
  41. cs_set_user_model(id, "vipct");
  42. }
  43. }
  44. return HAM_IGNORED;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement