PHP Code:
#include <amxmodx>
#include <hamsandwich>
new respawn_teams;
public plugin_init()
{
register_clcmd( "say /respawn", "Cmd_Respawn" );
respawn_teams = register_cvar( "respawn_teams", "3" );
}
public Cmd_Respawn( id )
{
static iTeam;
if( !is_user_alive( id )
&& ( 0 < ( iTeam = get_user_team( id ) ) < 3 )
&& ( get_pcvar_num( respawn_teams ) & iTeam ) )
{
ExecuteHam( Ham_CS_RoundRespawn, id );
}
}
Cvar:
respawn_teams < 0 | 1 | 2 | 3 >
0 = No one can respawn
1 = Only Terrorists
2 = Only Counter-Terrorists
3 = Both teams
__________________