Miscalculation?
#1

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);
Reply
#2

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?
Reply
#3

Not work.
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=364124
Reply
#5

Other?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)