PDA

View Full Version : Los Santos Boundaries


SecretBoss
12/09/2015, 02:27 PM
Hello guys,

I am making a gamemode on Los Santos and I don't want players leaving Los Santos city is there any way to block other cities?

Thanks

SecretBoss
12/09/2015, 05:30 PM
Any idea?

KillerDVX
12/09/2015, 05:36 PM
Hello SecretBoss,

Try this : https://wiki.sa-mp.com/wiki/SetPlayerWorldBounds

- KillerDVX

Michael B
12/09/2015, 05:51 PM
These should keep him inside Los Santos only.

SetPlayerWorldBounds(playerid,Float:3000,Float:37. 542662,Float:3000,Float:488.054608)

https://i.gyazo.com/46b3fa1d783077a9403af5c4d4999501.png

...or place roadblocks on each motorway to restrict players leaving the city (check this filterscript (http://forum.sa-mp.com/showthread.php?t=152350)).

SecretBoss
12/09/2015, 06:20 PM
Hello SecretBoss,

Try this : https://wiki.sa-mp.com/wiki/SetPlayerWorldBounds

- KillerDVX

I found it before, but I don't know how to use it


These should keep him inside Los Santos only.

SetPlayerWorldBounds(playerid,Float:3000,Float:37. 542662,Float:3000,Float:488.054608)

https://i.gyazo.com/46b3fa1d783077a9403af5c4d4999501.png

...or place roadblocks on each motorway to restrict players leaving the city (check this filterscript (http://forum.sa-mp.com/showthread.php?t=152350)).

I will try it now thanks for helping, +rep to both

Sellize
12/09/2015, 06:31 PM
Your signature is very misleading if you are not even capable of doing something like setting world boundries.

SecretBoss
12/09/2015, 06:40 PM
Your signature is very misleading if you are not even capable of doing something like setting world boundries.

I wanted something like a script that auto adds some places or something dynamic and whats the problem with it? Whole samp is boundries? lol

EDIT: And yea that code is not working

Michael B
12/09/2015, 06:53 PM
Which code? Where did you place the function?

SecretBoss
12/09/2015, 06:55 PM
Which code? Where did you place the function?

OnPlayerConnect, like wiki

SetPlayerWorldBounds(playerid,Float:3000,Float:37. 542662,Float:3000,Float:488.054608)

Michael B
12/09/2015, 06:57 PM
Try to place it under OnPlayerSpawn callback.

SecretBoss
12/09/2015, 07:01 PM
Try to place it under OnPlayerSpawn callback.

When I spawn my skin jumps and starts flying

KillerDVX
12/09/2015, 10:48 PM
As the callback's defined in wiki.sa-mp, it's under OnPlayerSpawn, so it should be either on your script.