boundarys? help
#1

Is it possible to make boundarys? like, i have a DM Zone, and i want it so if you were to leave that place and walk say a few feet, a message pops up saying

"cannot go this far, please go back or you will die."

and if they do go that far, they explode or something...or just die.


Is that possible? and how do i do it if it is?
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerWorldBounds
Reply
#3

SetPlayerWorldBounds



This function can be used to change the player's World Boundaries, thus restricting the places he/she can go to.



Parameters:
(playerid,Float_max,Float_min,Float:y_max,Floa t:y_min)
playerid The player you want to set the boundaries of.

Float_max The max. x-coordinate where the player can go.

Float_min The min. x-coordinate where the player can go.

Float:y_max The max. y-coordinate where the player can go.

Float:y_min The min. y-coordinate where the player can go.

This function does not return a specific value, it's best to simply ignore it.



pawn Код:
public OnPlayerSpawn(playerid)
{
  SetPlayerWorldBounds(playerid, 20.0, 0.0, 20.0, 0.0);
}

EDIT: Didn`t see your post Weirdosport
Reply
#4

Quote:
Originally Posted by Weirdosport
I don't understand how i'm suppose to do it? ....i no how to get cords, but i dont no how to fill them or which ones to fill
Reply
#5

Max means big, min means little.. Take the larger x value, and that's your x_max.. The smaller x value is x_min.. The playerid is the ID of the player.. etc etc.
Reply
#6

Just get coordinates of some specific area
Reply
#7

Quote:
Originally Posted by Weirdosport
So say i wanna get like...10 feet away from a gate, I go 10 feet away, type /save and the X cords (the first ones) are my Xmax? and Xmin is the same thing ?

I'm not understanding this....im so slow i swear lol..
Reply
#8

Oh,he said you basic things,and I too
Quote:
Originally Posted by Luka™
Just get coordinates of some specific area
Reply
#9

Quote:
Originally Posted by Luka™
Oh,he said you basic things,and I too
Quote:
Originally Posted by Luka™
Just get coordinates of some specific area
I'm trying to add a boundry around this map

http://forum.sa-mp.com/index.php?topic=103018.0

So people can't walk around with the weapons, the only way out is to teleport.

How do i do it? i tryed and it set boundarys everywhere in my server....please can someone do it and paste the cords
Reply
#10

OMG,go and get coordinates,don`t say you don`t know get coordinates
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)