SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 07/07/2014, 07:33 AM   #1
madalin912
Big Clucker
 
madalin912's Avatar
 
Join Date: Feb 2014
Posts: 76
Reputation: 2
Default Safezone

How do the spawn civil to be unable to kill ?
madalin912 is offline   Reply With Quote
Old 07/07/2014, 07:49 AM   #2
Twizted
Banned
 
Join Date: Feb 2011
Posts: 1,673
Reputation: 279
Default Re: Safezone

Look at the following thread and then mix it up with the "civilian" class?

http://forum.sa-mp.com/showthread.php?t=161639
Twizted is offline   Reply With Quote
Old 07/07/2014, 07:50 AM   #3
madalin912
Big Clucker
 
madalin912's Avatar
 
Join Date: Feb 2014
Posts: 76
Reputation: 2
Default Re: Safezone

I want to do something to not be able to pull in civil spawn.
madalin912 is offline   Reply With Quote
Old 07/07/2014, 07:58 AM   #4
Twizted
Banned
 
Join Date: Feb 2011
Posts: 1,673
Reputation: 279
Default Re: Safezone

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:

Code:
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;
    }
Twizted is offline   Reply With Quote
Old 07/07/2014, 04:16 PM   #5
madalin912
Big Clucker
 
madalin912's Avatar
 
Join Date: Feb 2014
Posts: 76
Reputation: 2
Default Re: Safezone

I can help me ?
madalin912 is offline   Reply With Quote
Old 08/07/2014, 08:03 AM   #6
madalin912
Big Clucker
 
madalin912's Avatar
 
Join Date: Feb 2014
Posts: 76
Reputation: 2
Default Re: Safezone

?
madalin912 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with safezone GAMER_PS2 Scripting Help 2 03/12/2011 06:42 AM
Safezone help Azzeto Scripting Help 2 18/10/2011 10:48 PM
safezone Jackass123 Help Archive 4 08/12/2009 05:20 PM
Safezone?!?!?!? [WF]Demon Help Archive 0 21/11/2009 11:08 PM
Safezone help whooper Help Archive 6 06/06/2009 11:29 PM


All times are GMT. The time now is 02:41 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.