SA-MP Forums Archive
Don't want player to go past a point? - 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: Don't want player to go past a point? (/showthread.php?tid=455175)



Don't want player to go past a point? - Marcus_Devil - 31.07.2013

Hello,

So, i am wanting like SF And surounding area for RP Zone but i want to stop people going past in to LS / LV I am going to RP It as like govnorment have destroyed there friendship and split up in to there own county's and when you cross state line you get shot xD so does anyone know how i can do this or another way around to stop people getting in to LS / LV


Re: Don't want player to go past a point? - CaveDweller - 31.07.2013

https://sampwiki.blast.hk/wiki/SetPlayerWorldBounds


Re : Don't want player to go past a point? - Marcus_Devil - 31.07.2013

Is there a way i can make it that like Admins can exit boundray?


Re: Don't want player to go past a point? - CaveDweller - 01.08.2013

Yes, only use SetPlayerWorldBounds for non-admins.


Re: Don't want player to go past a point? - DobbysGamertag - 01.08.2013

If you use an admin variable. Do an if statement
pawn Код:
if(!IsPlayerAdmin(playerid))
That's the default.

Here's mine,

pawn Код:
if(PlayerData[playerid][Admin] == 0)



Re: Don't want player to go past a point? - ReVo_ - 01.08.2013

A bit more logic:

When the player log in as admin you remove bounds

SetPlayerWorldBounds (playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);

inside https://sampwiki.blast.hk/wiki/OnRconLoginAttempt

When the player connect

SetPlayerWorldBounds (playerid, your limits);

inside https://sampwiki.blast.hk/wiki/OnPlayerConnect