[Help] - Mileage
#1

How to make this ? Is there any tutorial, or something ?
Reply
#2

pawn Код:
new Float:Milleage[MAX_VEHICLES];
pawn Код:
new Float:ST[4], vehicleid;

vehicleid = GetPlayerVehicleID(playerid);
   
    GetVehicleVelocity(vehicleid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;

    Milleage[vehicleid] += ST[3]/2000;
In Kilometers
Hopefully I helped you.
Reply
#3

Quote:
Originally Posted by GeasyW
Посмотреть сообщение
pawn Код:
new Float:Milleage[MAX_VEHICLES];
pawn Код:
new Float:ST[4], vehicleid;

vehicleid = GetPlayerVehicleID(playerid);
   
    GetVehicleVelocity(vehicleid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;

    Milleage[vehicleid] += ST[3]/2000;
In Kilometers
Hopefully I helped you.
That's it
Thank you very much...
Reply
#4

Glad to help you
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)