Restrictions[SetPlayerWorldBounds]
#1

Hello all,
I've currently made a Gang System.
It consists of Gang houses and areas for each gangs.

But I need to restrict each gang's area so that other gang members cant enter at that area.

I've looked over SetPlayerWorldBounds in wiki,but I didnt understand it well.
Can someone tell me how to keep restrictions using SetPlayerWorldBounds?

This is my Coordinate of which I need to create restriction
pawn Код:
-691.1240,-2075.0696,26.1244
Also in wiki,they add many zeros,I think its according to measurement of distance.
If im right,how can I know that how much zeros should I add?
Reply
#2

To get this job done personally, I'd create a per-player timer, and every few seconds or so check using IsPlayerInRangeOfPoint if they are in the specified radius of those coords.
Reply
#3

The function itself sets the world boundaries for someone to inside a square. A square has four points, this is what Xmin, Xmax, Ymin, and Ymax are. Here is the example from the wiki:
pawn Код:
/*
         ymax
     |----------|
     |          |
xmin |          | xmax
     |          |
     |----------|
         ymin
*/


Find the Y point any position over the Ymax and Ymin lines and do the same for the X (Xmin and Xmax). We don't use the Z co-ord because it's a 2d area.
Reply
#4

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
The function itself sets the world boundaries for someone to inside a square. A square has four points, this is what Xmin, Xmax, Ymin, and Ymax are. Here is the example from the wiki:
pawn Код:
/*
         ymax
     |----------|
     |          |
xmin |          | xmax
     |          |
     |----------|
         ymin
*/


Find the Y point any position over the Ymax and Ymin lines and do the same for the X (Xmin and Xmax). We don't use the Z co-ord because it's a 2d area.
Thanks.
Got it now..your post was like a mini tutorial.
Rewarded.
Reply
#5

Код:
SetPlayerWorldBounds(playerid,Float:x_max,Float:x_min,Float:y_max,Float:y_min);
pawn Код:
__
         ymax
     |----------|
     |          |
xmin |          | xmax
     |          |
     |----------|
         ymin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)