Object Pos Help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Object Pos Help (
/showthread.php?tid=150437)
Object Pos Help -
zilvernex - 26.05.2010
I want to be able to create an object in front of me and no matter what angle I'm facing the object will be going strait and not sideways. I got some images to explain.
When I create an object the object always spawns in the same angle. Like this..
But I want it to spawn like this..
Even if I'm facing North, South etc. How can I do that?
Thanks in advance for any help
Re: Object Pos Help -
Sascha - 26.05.2010
use
Код:
new Float:pz, Flot:x, Float:y, Float:z;
GetPlayerFacingAngle(playerid, pz)
GetPlayerPos(playerid, x, y, z);
CreateObject(theID, x, y, z, 0.00, 0.00, pz);
or just add the new Float

z and the pz at the CreateObject of your script