coordinates convert - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: coordinates convert (
/showthread.php?tid=384621)
coordinates convert -
PawnoQ - 12.10.2012
hi,
how can i get the player coordinates from some object coordinates?
So e.g. if i have this object:
pawn Код:
CreateObject(987,941.00000000,-1130.59997559,24.89999962,0.00000000,0.00000000,0.00000000);
how can i use this coordiantes with the SetPlayerPos function?
thanks.
Re: coordinates convert - Glint - 12.10.2012
Код:
SetPlayerPos(playerid, 941.00000000, -1130.59997559, 24.89999962);
Though there is no angle.
Re: coordinates convert -
Youice - 12.10.2012
you can put the "angle" float
Код:
SetPlayerFacingAngle(playerid, 0.00000000); //if you want to place an angle, though there is no angle
Re: coordinates convert -
PawnoQ - 12.10.2012
thanks. mhhh, but i already tried it like that and it didnt work.
Are you sure it can be done like that?
It seems like the coordinates of objects are a lot larger and longer than normal player coordinates?
Re: coordinates convert -
Youice - 12.10.2012
I have done it with the same way, and it worked, (try to approximate it?) be sure that numbers are matched correctly
Re: coordinates convert - Glint - 12.10.2012
Quote:
Originally Posted by PawnoQ
thanks. mhhh, but i already tried it like that and it didnt work.
Are you sure it can be done like that?
It seems like the coordinates of objects are a lot larger and longer than normal player coordinates?
|
Yes check the wiki too if you don't believe US.
Re: coordinates convert -
PawnoQ - 12.10.2012
thanks all + rep