SA-MP Forums Archive
Help getting angles.. - 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: Help getting angles.. (/showthread.php?tid=65693)



Help getting angles.. - Think - 15.02.2009

hey i need help with how the player is drifting i got this::::::


pawn Код:
new Float:z_rot;
        if(PRESSING(newkeys, KEY_HANDBRAKE))
        {
          GetVehicleZAngle(currentveh, z_rot);
          format(angle, sizeof(angle),"Angle:%d", z_rot);
        }
but i get like 35345345435335


Re: Help getting angles.. - [RP]Rav - 15.02.2009

replace %d with %f

%d or %i mean integer (exact values), while %f is for floats (decimal values)


Re: Help getting angles.. - Think - 15.02.2009

Quote:
Originally Posted by Rav
replace %d with %f

%d or %i mean integer (exact values), while %f is for floats (decimal values)
ty now i need is that if you press your handbrake than it shows how much degree's you turned, so not the angles the car is, how can i do that ? :X


Re: Help getting angles.. - [LDT]LuxurY - 15.02.2009

hmm...
newkeys = space oldkeys = something ( get angle )
newkeys = something oldkeys = space ( get angle and count angle )



Re: Help getting angles.. - rensfromrpas - 15.02.2009

when you use %d you can just do %3d then you would only see the first 3


Re: Help getting angles.. - Think - 15.02.2009

Quote:
Originally Posted by [PERG
prolol ]
when you use %d you can just do %3d then you would only see the first 3
its not the solution i need


Re: Help getting angles.. - rensfromrpas - 15.02.2009

Quote:
Originally Posted by Pandabeer1337
hey i need help with how the player is drifting i got this::::::


pawn Код:
new Float:z_rot;
        if(PRESSING(newkeys, KEY_HANDBRAKE))
        {
          GetVehicleZAngle(currentveh, z_rot);
          format(angle, sizeof(angle),"Angle:%d", z_rot);
        }
[but i get like 35345345435335
i tought maybe you wanted something to fix it


Re: Help getting angles.. - Think - 15.02.2009

Quote:
Originally Posted by [PERG
prolol ]
Quote:
Originally Posted by Pandabeer1337
hey i need help with how the player is drifting i got this::::::


pawn Код:
new Float:z_rot;
        if(PRESSING(newkeys, KEY_HANDBRAKE))
        {
          GetVehicleZAngle(currentveh, z_rot);
          format(angle, sizeof(angle),"Angle:%d", z_rot);
        }
[but i get like 35345345435335
i tought maybe you wanted something to fix it
i need this solution now

Quote:
Originally Posted by Pandabeer1337
i need is that if you press your handbrake than it shows how much degree's you turned, so not the angles the car is, how can i do that ? :X



Re: Help getting angles.. - rensfromrpas - 15.02.2009

Quote:
Originally Posted by Pandabeer1337
Quote:
Originally Posted by [PERG
prolol ]
Quote:
Originally Posted by Pandabeer1337
hey i need help with how the player is drifting i got this::::::


pawn Код:
new Float:z_rot;
        if(PRESSING(newkeys, KEY_HANDBRAKE))
        {
          GetVehicleZAngle(currentveh, z_rot);
          format(angle, sizeof(angle),"Angle:%d", z_rot);
        }
[but i get like 35345345435335
i tought maybe you wanted something to fix it
i need this solution now

Quote:
Originally Posted by Pandabeer1337
i need is that if you press your handbrake than it shows how much degree's you turned, so not the angles the car is, how can i do that ? :X
ask henk for it


Re: Help getting angles.. - Think - 15.02.2009

Quote:
Originally Posted by [LDT
LuxurY ]
hmm...
newkeys = space oldkeys = something ( get angle )
newkeys = something oldkeys = space ( get angle and count angle )
can you maybe work it out a bit more cuz i cant make anything out of this ;p