26.07.2010, 21:30
I made a anti spawn killing system last night. Today I realized, that when anyone spawns, it set's their health to 100. I know what the bug is, just not sure how to fix it.
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerRandomSpawn(playerid);
SetPlayerInterior(playerid,0);
SetPlayerMoney(playerid, 10000);
SendClientMessage(playerid, ORANGE, "The bank has gifted you $10,000!");
SendClientMessage(playerid, RED, "ANTI SPAWN KILL: 15 Seconds left!");
SetPlayerHealth(playerid, 1000000.0);
SetTimer("SpawnKill", 15000, false);
return 1;
}
forward SpawnKill(playerid);
public SpawnKill(playerid)
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, GREEN, "ANTI SPAWN KILL: Disabled!");
return 1;
}