Ten Second Invincibility
#4

Quote:
Originally Posted by Markx
Посмотреть сообщение
pawn Код:
//On top

new AntiSpawnKillProtected[MAX_PLAYERS];

forward AntiSpawnKillOff(playerid);

//Under OnPlayerSpawn
AntiSpawnKillProtected[playerid] = 1;
SetTimer("AntiSpawnKillOff", 10000, false);

// Under OnPlayerUpdate
if(AntiSpawnKillProtected[playerid] == 1)
{
    SetPlayerHealth(playerid, 1000);
}

//Somewhere in script (outside a callback)

AntiSpawnKillOff(playerid)
{
    SetPlayerHealth(playerid, 100);
    AntiSpawnKillProtected[playerid] = 0;
    SendClientMessage(playerid, -1, "Anti spawn kill is now off!");
    return true;
}
I see at least someone is searching/reading older posts
Respect man
Reply


Messages In This Thread
Ten Second Invincibility - by Jack_Rocker - 12.06.2011, 19:59
Re: Ten Second Invincibility - by Markx - 12.06.2011, 20:04
Re: Ten Second Invincibility - by Jack_Rocker - 12.06.2011, 20:17
Re: Ten Second Invincibility - by DRIFT_HUNTER - 12.06.2011, 20:19

Forum Jump:


Users browsing this thread: 2 Guest(s)