14.11.2010, 11:14
(
Последний раз редактировалось DeathOnaStick; 14.11.2010 в 13:25.
)
It's possible, just check if the player is in the area, like hiddos said.
In addition i made a totally useless example with a graphic that actually nobody will understand:
In this example you can('t) see, that you just need to divide the area into some squares, like you also can('t) see here (maybe here you can('t) see it better than the last one):
For this example this pawn code could be used:
Then you just need to go on by adding more square and your area will be finished. If you want it to be exactly like worldbounds, you will need to use setplayervelocity, to push the player away from the border.
In addition i made a totally useless example with a graphic that actually nobody will understand:
In this example you can('t) see, that you just need to divide the area into some squares, like you also can('t) see here (maybe here you can('t) see it better than the last one):
For this example this pawn code could be used:
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (y<90 && y>75 && x<130 && x>100) //Player is in the first square
else //Player isn't in the first square