Posts: 404
Threads: 104
Joined: Sep 2008
Reputation:
0
So i have a coordinate, let's say:
x = 10, y = 2
And let's say i want to travel 20 "units" in 90° direction (west in-game).
What would be my new x and y?
Can you give me a snipet/function/explain how to do this?
Thank you.
Posts: 117
Threads: 10
Joined: Nov 2013
Reputation:
0
do /save [optional(name)]
goto savedpositions.txt in samp files
and get the new x y code
\Documents\GTA San Andreas User Files\SAMP
default
Posts: 772
Threads: 79
Joined: Dec 2012
pawn Код:
new Float:X,Float:Y,Float:Z,Float:Angle;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
Then do what you want to do.
Posts: 404
Threads: 104
Joined: Sep 2008
Reputation:
0
I don't want to manually do it, i want the server to calculate it.
For instance a function like this:
GetDistanceXY(current_x, current_y, distance, angle)
And it returns the new x/y, which are "distance" far from current_x and current_y at "angle".