Screen: http://i34.tinypic.com/f5jdw.gif
Cały kod w załączniku.
Najbardziej podejrzana cześć kodu:
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////// SPECTATOR THINGS ////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
public setSpectate(id)
{
new team;
team = get_pdata_int(id, 114, 5);
switch(team)
{
case 1:
{
oldSpecTeam[id] = 1;
cs_set_user_team(id, CS_TEAM_SPECTATOR, CS_DONTCHANGE);
if(is_user_alive(id))
user_kill(id);
}
case 2:
{
oldSpecTeam[id] = 2;
cs_set_user_team(id, CS_TEAM_SPECTATOR, CS_DONTCHANGE);
if(is_user_alive(id))
user_kill(id);
}
case 3:
{
switch(oldSpecTeam[id])
{
case 1:
{
cs_set_user_team(id, CS_TEAM_T, CS_T_TERROR);
set_task(0.5, "task_afterSpecChange", id);
}
default:
{
cs_set_user_team(id, CS_TEAM_CT, CS_CT_GIGN);
set_task(0.5, "task_afterSpecChange", id);
}
}
}
default: return FMRES_IGNORED;
}
return PLUGIN_CONTINUE;
}
public task_afterSpecChange(id)
{
//log_amx("AT: task_afterSpecChange");
dllfunc(DLLFunc_Spawn, id);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////// RESPAWN ////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
public DeathMsg()
{
new id = read_data(2);
set_task(0.4, "remove_body", id);
new victim;
victim = read_data(2)
if (get_cvar_num("surf_respawn") > 0)
set_task(0.6, "respawn_player", victim + 483)
new origin[3]
get_user_origin(id, origin)
return PLUGIN_CONTINUE;
}
public remove_body(id)
{
entity_set_origin(id, Float:{-4096.0, -4096.0, -4096.0});
}
public respawn_player(id)
{
id -= 483;
if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR) return;
set_pev(id, pev_deadflag, DEAD_RESPAWNABLE)
dllfunc(DLLFunc_Think, id)
if (is_user_bot(id) && pev(id, pev_deadflag) == DEAD_RESPAWNABLE)
{
dllfunc(DLLFunc_Spawn, id)
}
{
new team = entity_get_int(id, EV_INT_team);
switch(team)
{
case 1:
{
cs_set_user_model(id, "leet")
}
case 2:
{
cs_set_user_model(id, "gign")
}
default:
{
//co sie ma stac jezeli nie jest ani TT ani CT
}
}
}
}
public sayrespawn(gracz)
{
if (!is_user_connected(gracz) || cs_get_user_team(gracz) == CS_TEAM_SPECTATOR) return PLUGIN_HANDLED;
set_pev(gracz, pev_deadflag, DEAD_RESPAWNABLE)
dllfunc(DLLFunc_Think, gracz)
dllfunc(DLLFunc_Spawn, gracz)
return PLUGIN_HANDLED;
}