21.12.2013, 17:04
Not tested but that should work
pawn Код:
new Protected[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
Protected[playerid] = 1;
SetTimer("Endprotect",3000,false);//change 3000 to the protect time you want
return 1;
}
forward Endprotect(playerid);
public Endprotect(playerid)
{
Protected[playerid] = 0;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(Protected[playerid] == 1)
{
SetPlayerHealth(killerid,0);
}
return 1;
}