Miscalculation? - 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: Miscalculation? (
/showthread.php?tid=510388)
Miscalculation? -
TheSy - 30.04.2014
I am a computing system for a km-system, except that when I go by car it does nothing.
Here is my calculation:
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
#define Reglage_Vitesse 4
new Float:DistanceVitesse = floatsqroot(floatpower(floatabs(floatsub(x, x)), 2) + floatpower(floatabs(floatsub(y, y)), 2));
new vitesse = (floatround(DistanceVitesse)*Reglage_Vitesse);
Respuesta: Miscalculation? -
Swedky - 01.05.2014
Quote:
Originally Posted by TheSy
pawn Код:
new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z);
|
That does not work. This yes:
pawn Код:
new Float:x, Float:y, Float:z;
if(IsPlayerInAnyVehicle(playerid)) GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
else GetPlayerPos(playerid, x, y, z);
Though I believe that sense does not make. Would not it be
GetPlayerVelocity -
GetVehicleVelocity?
Re: Miscalculation? -
TheSy - 01.05.2014
Not work.
Re: Miscalculation? -
Konstantinos - 01.05.2014
https://sampforum.blast.hk/showthread.php?tid=364124
Re: Miscalculation? -
TheSy - 01.05.2014
Other?