26.07.2010, 20:12
Guys I want make Players when they will spawn they will be protected 5 seconds
This solves your problem!
https://sampforum.blast.hk/showthread.php?tid=137642 First time i helped someone on this forum |
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInRangeOfPoint(killerid, 20, 1587, -1693, 7)) // It means that if the player is within 20 meter range some around the Garage of LSPD the following will happen :
{
SetPlayerHealth(killerid, 0); // my punishment for the Spawn Killer is Death.
SendClientMessage(killerid, Red, "SERVER : You can't spawn kill!"); // then sends him a message that he can't spawn kill
}
return 1;
}
SetTimerEx
forward ProtectionStop(playerid)
public ProtectionStop(playerid)
{
SetPlayersHealth(playerid,100);
}
At OnPlayerSpawn, make a timer and give health 999 to player.
Make an individual timer for only spawned player. pawn Код:
pawn Код:
|