Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.88 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include < amxmodx >
  4. #include < cstrike >
  5. #include < hamsandwich >
  6.  
  7. #define PLUGIN "New Plug-In"
  8. #define VERSION "1.0"
  9. #define AUTHOR "author"
  10.  
  11. #define GET_CLASS(%1) cs_get_user_team(%1) == CS_TEAM_CT ? COUNTER : TERRO
  12. #define SET_MODEL(%1) cs_get_user_team(%1) == CS_TEAM_CT ? 1 : 0
  13.  
  14. enum _:CLASS
  15. {
  16.     COUNTER,
  17.     TERRO
  18. }
  19. new const MODEL[CLASS][] =
  20. {
  21.     "models/player/terromodel.mdl",
  22.     "models/player/ctmodel.mdl"
  23. }
  24. public plugin_init() {
  25.     register_plugin(PLUGIN, VERSION, AUTHOR)
  26.    
  27.     RegisterHam(Ham_Spawn, "player", "Player_Spawned", true)
  28.    
  29. }
  30.  
  31. public plugin_precache() for(new i = 0 ; i < sizeof(MODEL) ; i++) precache_model(MODEL[i])
  32.  
  33. public Player_Spawned(id)
  34. {
  35.     if( !is_user_alive(id) || !is_user_connected(id) )
  36.         return HAM_IGNORED
  37.  
  38.     cs_set_user_model(id, MODEL[ GET_CLASS(id) ][ SET_MODEL(id) ])
  39.    
  40.     return HAM_IGNORED
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement