SA-MP Forums Archive
Zones Help.... - 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: Zones Help.... (/showthread.php?tid=479292)



Zones Help.... - AryanV - 04.12.2013

How To Create a Zone For Specific Players ForExample:- There is a Zone Created for a Clan But If A Player Enterd That Zone Who is Not a Clan Member get Spawned....Plz Teach It To me Or Give Me a Code



Re: Zones Help.... - gotwarzone - 04.12.2013

Quote:

But If A Player Enterd That Zone Who is Not a Clan Member get Spawned

Can you please explain this a little bit more?

You mean if a player who is not a clan member who entered that zone, that player will spawned back to his default spawn point?


Re: Zones Help.... - AryanV - 04.12.2013

Quote:

You mean if a player who is not a clan member who entered that zone, that player will spawned back to his default spawn point?

Yes I Mean That Only..


Re: Zones Help.... - gotwarzone - 04.12.2013

You can use AreaCheck Areacheck - Wiki

e.g

Код HTML:
public isPlayerInArea()
   {
       new Float:X, Float:Y, Float:Z; //We use this to store player position
       for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
       {
           GetPlayerPos(i, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously
           if (X <= -3915 && X >= -3694 && Y <= 401 && Y >= 37)
           /* This line is the important one!. Here, is where you change those numbers, by the ones
           you get from the /pos command. As you can see, those coordinates, are only the X and Y ones, the Z
           doesnt matter*/
           {
               SetPlayerHealth(i, -999999.9); //This will ensure, that our player gets killed if he tries to enter
           }
       }
   }
You can change this line SetPlayerHealth(i, -999999.9); to SetPlayerPos(playerid,0.0,0.0,3.0); //Your default gang spawn point. So if different clan player tried to enter your clan zone area he will spawn back to his default clan zone.

I couldn't script you all. But I can guide you. I hope someone help you with this.