Safezone - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Safezone (
/showthread.php?tid=524523)
Safezone -
madalin912 - 07.07.2014
How do the spawn civil to be unable to kill ?
Re: Safezone -
Twizted - 07.07.2014
Look at the following thread and then mix it up with the "civilian" class?
https://sampforum.blast.hk/showthread.php?tid=161639
Re: Safezone -
madalin912 - 07.07.2014
I want to do something to not be able to pull in civil spawn.
Re: Safezone -
Twizted - 07.07.2014
Then you must use
IsPlayerInRangeOfPoint. With this function, you'll be able to set an area for the civils, and nobody except the civilians will be able to be inside it. An example of how it should look like:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
{
if(PlayerIsCivilian(playerid))
{
SendClientMessage(playerid,-1,"You are a civilian, you can stay here.");
}
else
{
SetPlayerPos(playerid, 2680.6880, -1704.6333, 11.8438)//SetPlayerPos somewhere outside the RangeOfPoint above
SendClientMessage(playerid, -1, "You are not a civilian, you can't stay here!")
}
return 1;
}
Re: Safezone -
madalin912 - 07.07.2014
I can help me ?
Re: Safezone -
madalin912 - 08.07.2014
?