Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <hamsandwich>
- #include <cstrike>
- new cRespawnInterval;
- public plugin_init()
- {
- register_plugin("Surf Respawn", "1.0", "OvidiuS");
- cRespawnInterval = register_cvar("amx_respawn_interval", "120");
- set_task(get_pcvar_float(cRespawnInterval), "Task_RespawnPlayers");
- }
- public Task_RespawnPlayers( )
- {
- static iDeadPlayers[ 32 ], iDeadCount;
- get_players(iDeadPlayers, iDeadCount, "bch")
- if( iDeadCount )
- {
- client_print(0, print_chat, "Everyone has been respawned.")
- static iDeadPlayer, CsTeams:iTeam;
- for( --iDeadCount; iDeadCount >= 0; iDeadCount-- )
- {
- iDeadPlayer = iDeadPlayers[ iDeadCount ]
- iTeam = cs_get_user_team( iDeadPlayer )
- if(iTeam == CS_TEAM_T || iTeam == CS_TEAM_CT)
- ExecuteHamB( Ham_CS_RoundRespawn, iDeadPlayer );
- }
- }
- set_task(get_pcvar_float(cRespawnInterval), "Task_RespawnPlayers");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement