Hi. I use this test-code for Swap Players teams:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <fakemeta>
public plugin_init()
{
register_plugin("Test", "0.1", "Phantomas")
register_clcmd("say t", "clcmdT");
}
team_swap(id, CsTeams:team)
{
if(team == CS_TEAM_T)
{
//cs_set_user_team(id, CS_TEAM_CT, CS_DONTCHANGE)
set_pdata_int(id, 114, 2)
} else {
//cs_set_user_team(id, CS_TEAM_T, CS_DONTCHANGE)
set_pdata_int(id, 114, 1)
}
}
public clcmdT(id)
{
new players[32], pnum, plr
get_players(players, pnum, "h")
for (new i; i<pnum; i++)
{
plr = players[i]
new CsTeams:team
team = cs_get_user_team(plr)
if(team == CS_TEAM_T || CS_TEAM_CT) {
team_swap(plr, team)
}
}
}
And when I test it on server with ~10 players (5x5), it's okay, all works fine.
But when server have more players (I test 16x16 with PODBots), then
server crashed at new round start moment (after swapping):
Quote:
SZ_GetSpace: overflow without FSB_ALLOWOVERFLOW set on Server Reliable Datagram
|
Any ideas how to bypass it? cs_set_user_team() got crash too.