@kielor
Code
public CmdRespawn(id) {
if(ExecuteHamB(Ham_IsPlayer, id))
ExecuteHamB(Ham_CS_RoundRespawn,id)
}
Вот кусок из моего training плагина:
Code
public plugin_init() {
RegisterHam(Ham_Spawn, "player" , "HamPlayerSpawn", 1)
RegisterHam(Ham_Killed, "player", "HamPlayerKilled", 1)
}
public HamPlayerSpawn(id)
{
GiveItems( id )
g_bGodmode[ id ] = true
gPlayerAlive[ id ] = is_user_alive(id)
set_user_godmode(id, 1)
}
public HamPlayerKilled(id)
{
if(ExecuteHamB(Ham_IsPlayer, id))
CmdRespawn(id)
}
public CmdRespawn(id)
{
new CsTeams:team = cs_get_user_team(id)
if (team == CS_TEAM_SPECTATOR)
{
return PLUGIN_HANDLED
}
else
{
ExecuteHamB(Ham_CS_RoundRespawn,id)
return PLUGIN_HANDLED
}