Hi.
I have this code.
PHP Code:
#include <amxmodx>
#include <cstrike>
new const VERSION[] = "0.0.3"
const MAX_PLAYERS = 32
public plugin_init()
{
register_plugin("Switch Teams On Ct Wins", VERSION, "Gran.torino")
register_event("SendAudio", "Event_SendAudio_MRAD_ctwin", "a", "1=0", "2=%!MRAD_ctwin")
}
//http://wiki.amxmodx.org/Half-Life_1_Game_Events#SendAudio
public Event_SendAudio_MRAD_ctwin()
{
new iPlayers[MAX_PLAYERS], iNum, id
get_players(iPlayers, iNum)
for(new i; i<iNum; i++)
{
id = iPlayers[i]
switch( cs_get_user_team(id) )
{
case CS_TEAM_T:
{
cs_set_user_team(id, CS_TEAM_CT, CS_CT_GIGN)
}
case CS_TEAM_CT:
{
cs_set_user_team(id, CS_TEAM_T, CS_T_ARCTIC)
}
}
}
}
The problem is that when the server has many people, falls servidor by SZ_GetSpace: Without Overflow FSB_ALLOWOVERFLOW, which is the problem this code?