Speedometer does not display at all. (Screenshot).
#6

Issue with strings, im not sure but this should work fine -
pawn Код:
public SpeedoUpdate(playerid)
{
 if(IsPlayerInAnyVehicle(playerid))
        {
            new Float:x,Float:y,Float:z,string[24],string2[24],vehicleid = GetPlayerVehicleID(playerid);
            GetVehicleVelocity(vehicleid,x,y,z);
            format(string2,sizeof(string2),"~g~Speed: ~w~%d mph",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*156.666667*0.641371192));
            TextDrawSetString(speed[playerid],string2);
            format(string,sizeof(string),"~g~Fuel: ~w~%d%%",VehFuel[vehicleid]);
            TextDrawSetString(fuel[playerid],string);
        }

}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)