28.09.2013, 15:45
Fixed Code
pawn Код:
new Text3D:antispawnkill;//global variable, not local
public OnPlayerSpawn(playerid)
{
SetPlayerHealth(playerid, 10000.0);
SendClientMessage(playerid, 0xFF0000AA, "You can't be killed for 5 second(s) (spawn protection)");
SetTimerEx("AntiSpawnkill",PROTECTIONTIME*1500,0,"d",playerid);
antispawnkill = Create3DTextLabel("{FF0000}default red", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(antispawnkill, playerid, 0.0, 0.0, 0.7);
}
public AntiSpawnkill(playerid)
{
DeletePlayer3DTextLabel(playerid, PlayerText3D:antispawnkill);
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, 0x00ff00ff, "Anti Spawn kill protection over.");
return 1;
}