Restrictions[SetPlayerWorldBounds] -
Lordzy - 16.09.2012
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?
Re: Restrictions[SetPlayerWorldBounds] -
zDevon - 16.09.2012
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.
Re: Restrictions[SetPlayerWorldBounds] -
[HiC]TheKiller - 16.09.2012
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.
Re: Restrictions[SetPlayerWorldBounds] -
Lordzy - 16.09.2012
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.
Re: Restrictions[SetPlayerWorldBounds] -
IceMeteor - 16.09.2012
Код:
SetPlayerWorldBounds(playerid,Float:x_max,Float:x_min,Float:y_max,Float:y_min);
pawn Код:
__
ymax
|----------|
| |
xmin | | xmax
| |
|----------|
ymin