Positioning gates from garage coordinates - 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: Positioning gates from garage coordinates (
/showthread.php?tid=491155)
Positioning gates from garage coordinates -
dusk - 29.01.2014
Hey.
I get a garage objects x, y, z coordinates and Z rotation. I want to place its gate accordingly....
I tried calculating it myself and failed, my code:
pawn Код:
ix = x - 3.0 * floatcos(angle,degrees);
y = y + 3.0 * floatsin(angle,degrees);
note: z coordinate is not important.
So if someone could help me or atleast point me in the right direction i would be very happy.
Re: Positioning gates from garage coordinates -
dusk - 02.02.2014
bump
Re: Positioning gates from garage coordinates -
rappy93 - 02.02.2014
I dont get it ,you want to add a gate to a garage?
Re: Positioning gates from garage coordinates -
dusk - 02.02.2014
Yes, but I want to be able to get coordinates for the gate while only knowing garages coordinates and it's z angle
Re: Positioning gates from garage coordinates -
rappy93 - 02.02.2014
Ah...I was gonna suggest you add the object with MapEditor and then make an /open command.
Re: Positioning gates from garage coordinates -
dusk - 08.02.2014
bump