SA-MP Forums Archive
GetObjectZAngle - 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: GetObjectZAngle (/showthread.php?tid=269251)



GetObjectZAngle - Lorenc_ - 15.07.2011

Title says it all its 4:00 am here and tired, I don't have a clue how this could be created at this time, I need a function for some calculations on a objects, I'd be really grateful if anyone can get me this function (Create perhaps since it does not exist)

I have searched, no results!

pawn Код:
stock GetObjectZAngle(obj, &Float:angle)
{
    new Float:X, Float:Y;
    GetObjectRot(obj, X, Y, angle);
    return _:angle;
}
Doubting this would work since I just wrote it here.


Re: GetObjectZAngle - Tigerkiller - 15.07.2011

You want to Create objects at 4:00 ?


Re: GetObjectZAngle - Lorenc_ - 15.07.2011

Quote:
Originally Posted by Tigerkiller
Посмотреть сообщение
You want to Create objects at 4:00 ?
You're making a un-needed comment and you neither make sense, please don't reply if you don't understand nor cannot read properly and aim for post count...


Re: GetObjectZAngle - [MG]Dimi - 15.07.2011

new Float:x[3];
GetObjectRot(objectid,x[0],x[1],x[2]);


and then for your needs use x[2]


Re: GetObjectZAngle - RyDeR` - 15.07.2011

pawn Код:
stock Float: GetObjectRotZ(objectid)
{
    static
        Float: rot_Z
    ;
    if(GetObjectRot(objectid, rot_Z, rot_Z, rot_Z))
    {
        return rot_Z;
    }
    return 0.0;
}