04.03.2012, 19:15
So i got the ODO script:
But it updates for meters... Anyone knows how to make this for KM? :S
pawn Код:
new string[128];
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerVehicleSeat(playerid) == 0)
{
new vehid = GetPlayerVehicleID(playerid);
vehicle_odometers[vehid] += GetPlayerDistanceFromPoint(playerid, old_veh_pos[vehid][0], old_veh_pos[vehid][1], old_veh_pos[vehid][2]);
GetVehiclePos( vehid, old_veh_pos[vehid][0], old_veh_pos[vehid][1], old_veh_pos[vehid][2]);
format(string, sizeof(string), "Your odo: %0.2f", vehicle_odometers[vehid]);
SendClientMessage(playerid, COLOR_GREY, string);
}
}