Advertisement
OvidiuS

Respawn on Time [ MILF SURF RESPAWN ]

Mar 5th, 2012
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.89 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <cstrike>
  4.  
  5. new cRespawnInterval;
  6.  
  7. public plugin_init()
  8. {
  9.     register_plugin("Surf Respawn", "1.0", "OvidiuS");
  10.  
  11.     cRespawnInterval = register_cvar("amx_respawn_interval", "120");
  12.    
  13.     set_task(get_pcvar_float(cRespawnInterval), "Task_RespawnPlayers");
  14. }
  15.  
  16. public Task_RespawnPlayers( )
  17. {
  18.     static iDeadPlayers[ 32 ], iDeadCount;
  19.  
  20.     get_players(iDeadPlayers, iDeadCount, "bch")
  21.    
  22.     if( iDeadCount )
  23.     {
  24.         client_print(0, print_chat, "Everyone has been respawned.")
  25.        
  26.         static iDeadPlayer, CsTeams:iTeam;
  27.         for( --iDeadCount; iDeadCount >= 0; iDeadCount-- )
  28.         {
  29.             iDeadPlayer = iDeadPlayers[ iDeadCount ]
  30.            
  31.             iTeam = cs_get_user_team( iDeadPlayer )
  32.            
  33.             if(iTeam == CS_TEAM_T || iTeam == CS_TEAM_CT)
  34.                 ExecuteHamB( Ham_CS_RoundRespawn, iDeadPlayer );
  35.         }
  36.     }
  37.     set_task(get_pcvar_float(cRespawnInterval), "Task_RespawnPlayers");
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement