Advertisement
CheezPuff

Terrorists Random Models (4) v1.0

Feb 12th, 2015
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.97 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include < amxmodx >
  4. #include < cstrike >
  5. #include < hamsandwich >
  6.  
  7. #define PLUGIN "Terrorists Random Models"
  8. #define VERSION "1.0"
  9. #define AUTHOR "CheezPuff"
  10.  
  11. new const g_szTerroristsModels[][] =
  12. {
  13.     "zombie",
  14.     "tzerk",
  15.     "teroka",
  16.          "zombie2"
  17. };
  18.  
  19. public plugin_precache()
  20. {
  21.     static szModel[ 192 ];
  22.    
  23.     for ( new i = 0; i < sizeof g_szTerroristsModels; i++ )
  24.     {
  25.         formatex( szModel, charsmax( szModel ), "models/player/%s/%s.mdl", g_szTerroristsModels[ i ], g_szTerroristsModels[ i ] );
  26.        
  27.         precache_model( szModel );
  28.     }
  29. }
  30.  
  31. public plugin_init()
  32. {
  33.     register_plugin(PLUGIN, VERSION, AUTHOR)
  34.    
  35.     RegisterHam( Ham_Spawn, "player", "FwdPlayerSpawn_Post", 1 );
  36. }
  37.  
  38. public FwdPlayerSpawn_Post( client )
  39. {
  40.     if ( !is_user_connected( client ) )
  41.         return 1;
  42.        
  43.     if(cs_get_user_team( client ) == CS_TEAM_T)  cs_set_user_model( client, g_szTerroristsModels[ random( sizeof g_szTerroristsModels ) ] );
  44.    
  45.     return 1;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement