SetPlayerWorldBounds - Usage? -
JaKe Elite - 22.01.2014
We all know SetPlayerWorldBounds function as to keep player in the specify area.
And it got 4 points to do it, XMax, XMin, YMax, YMin, and i did that.
Now the problem is, I can't seem to function it right, I got the coordinates for that and i always get "Stay in the World Boundaries" even i am inside the World Boundary!
Here's screenshot:
World Bounds i set for the round.
Results:
----
How i do it.
Код:
AddStaticVehicle(522,-290.2446,-303.2623,4.5036,118.0774,3,8); // xmin
AddStaticVehicle(522,378.4546,-396.5240,24.3621,267.5102,6,25); // xmax
AddStaticVehicle(522,195.0797,-458.1328,14.7314,85.4236,6,25); // ymax
AddStaticVehicle(522,204.6932,114.0143,3.4568,353.6342,6,25); // ymin
pawn Код:
SetPlayerWorldBounds(playerid, 378.4546, -290.2446, -458.1328, 114.0143);
In the AddStaticVehicle, Which coords should i use? Can someone explain, Reply if you don't quite understand.
Re: SetPlayerWorldBounds - Usage? -
JaKe Elite - 22.01.2014
BUMP
Re: SetPlayerWorldBounds - Usage? -
newbienoob - 22.01.2014
EDIT: I got confused. Try this
I'm not pretty sure though.
Re: SetPlayerWorldBounds - Usage? -
VishvaJeet - 22.01.2014
(1)__________
|_________|
|_________|
|_________|
|_________|
|________ |(2)
Take 1st save pos like (/save X pos)
then 2nd as in figure

(/save Y pos)
AddPlayerClass(171, Pos X, Pos Y, Pos Z, Angle, 0,0,0,0,0,0);
AddPlayerClass(171, 1959.9679, -2191.6731, 13.5469, 149.4236, 0,0,0,0,0,0); // X Pos
AddPlayerClass(171, 1854.9679, -1152,13.5469, 149.4236, 0,0,0,0,0,0); // Y Pos
Then find Max_X cordinate from both save pos cordinate, which is max paste SetPlayerWorldBounds(playerid,
Max_X, Min_X, Max_Y, Min_Y);
Then find Min_X cordinate from both save pos cordinate, which is min paste SetPlayerWorldBounds(playerid, Max_X,
Min_X, Max_Y, Min_Y);
Then find Max_Y cordinate from both save pos cordinate, which is max paste SetPlayerWorldBounds(playerid, Max_X, Min_X,
Max_Y, Min_Y);
Then find Min_Y cordinate from both save pos cordinate, which is min paste SetPlayerWorldBounds(playerid, Max_X, Min_X, Max_Y,
Min_Y);
SetPlayerWorldBounds(playerid, Max_X, Min_X, Max_Y, Min_Y);
Re: SetPlayerWorldBounds - Usage? -
Threshold - 22.01.2014
pawn Код:
SetPlayerWorldBounds(playerid, 378.4546, -290.2446, -458.1328, 114.0143);
Код:
SetPlayerWorldBounds(playerid,Float:x_max,Float:x_min,Float:y_max,Float:y_min)
Look closely, you will notice that you have -458 as y_max, and 114 as y_min. I could of sworn -458 was less than 114? xD