Does this exist? - 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: Does this exist? (
/showthread.php?tid=274928)
[SOLVED]Does this exist? -
Mean - 07.08.2011
Anyone has a function like GetPlayerRotation, so I can use it with SetObjectRot?
I want to "attach" the object to a player, without AttachObjectToPlayer, because AttachObjectToPlayer can't do what I want.
Anyone has something similar, like
pawn Code:
GetPlayerRotation( playerid, &Float:rotx, &Float:roty, &Float:rotz )
? I really need it, any help would be welcome.
And no, GetXYInFrontOfPlayer doesn't do what I want.
Re: Does this exist? -
MadeMan - 07.08.2011
https://sampwiki.blast.hk/wiki/GetPlayerFacingAngle
Re: Does this exist? -
sleepysnowflake - 07.08.2011
Use something with timers so you can check where players is looking ?
Re: Does this exist? -
Mean - 07.08.2011
Quote:
Originally Posted by MadeMan
|
I need an X&Y rotation, not facing angle.
Re: Does this exist? -
Vince - 07.08.2011
You can't get the X or Y rotation of player. Not possible.
Re: Does this exist? -
lolumadd_ - 07.08.2011
Code:
GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z)
You can only check the rotations of vehicles, not players, since players can't tilt or rotate..
Re: Does this exist? -
Mean - 07.08.2011
Oh damn :/, well I guess there must be a custom function, like GetXYInFrontOfPlayer.
Re: Does this exist? -
MadeMan - 07.08.2011
Quote:
Originally Posted by lolumadd_
players can't tilt or rotate..
|
Agree. (rotate on X and Y axis)
Re: Does this exist? -
Sasino97 - 07.08.2011
It's not possible, only Z rotation is possible to get.
The players never rotate on X or Y angle, when they fall with a parachute their XY rot didn't change, it's just an animation.
EDIT: With SetPlayerAttachedObject you can select the BONE that you want to attach the object to.
Download HOLD-STUDIO by Slice. I'm using that.
Re: Does this exist? -
Mean - 07.08.2011
No, no attaching system has what I need...
Well, how is Z rot possible to get? I'd like to know.
EDIT: my fault, I forgot GetPlayerFacingAngle actually gets the Z angle ...
Solved!