14.03.2011, 17:31
how do i make when player spawn, their health is 600000 for 5sec after it turns to 100(anti kill)
public OnPlayerSpawn(playerid)
{
SetPlayerHealth(playerid, 99999);
SetTimerEx("AntiKill", 5000, false, "i", playerid);
}
public AntiKill(playerid)
{
SetPlayerHealth(playerid, 100);
}
public OnPlayerSpawn(playerid)
{
SetPlayerHealth( playerid, 600000 );
SetTimer( "Health", 5000, 0 );
}
forward Health( playerid );
public Health( playerid )
{
SetPlayerHealth( playerid, 100 );
}
public OnPlayerSpawn(playerid)
{
SetTimerEx("AntiSpawnKill",10000,false,"i",playerid);
Antikill[playerid] = true;
return 1;
}
forward AntiSpawnKill(playerid);
public AntiSpawnKill(playerid)
{
if(Antikill[playerid] == true)
{
SetPlayerHealth(playerid,100);
SendClientMessage(playerid, 0xFF0000AA, "Anti-Spawnkill protection is over now!");
Antikill[playerid] = false;
}
return 1;
}
try this
pawn Код:
pawn Код:
|