Speedo
#2

OP show your sv array definition please.

Edit: For starters, few code improvements:
pawn Код:
public Speedometer(playerid) {
    GetVehicleVelocity(GetPlayerVehicleID(playerid),sv[0],sv[1],sv[2]); //This function doesn't return a value
    sv[3] = floatround((floatsqroot(((sv[0]*sv[0])+(sv[1]*sv[1])+(sv[2]*sv[2]))* 181.5), floatround_round); // If sv[3] is an integer, your previous code will mess up stuff.
    format(fquery,sizeof(fquery),"Vehicle: %s~n~Speed: %i KPH", GetVehicleNameFromModel(GetPlayerVehicleID(playerid)),sv[3]); //Model will be fetched from inside that function
    PlayerTextDrawSetString(playerid,Speedo[playerid],fquery);
    return 1;
}

//and
stock GetVehicleNameFromModel(modelid)
{
    return VehicleNames[GetVehicleModel(modelid) - 400];
}
Reply


Messages In This Thread
Speedo - by Zonoya - 17.03.2015, 17:17
Re: Speedo - by Misiur - 17.03.2015, 17:25
Re: Speedo - by Zonoya - 17.03.2015, 18:43
Re: Speedo - by Misiur - 17.03.2015, 18:55
Re: Speedo - by Zonoya - 17.03.2015, 19:24
Re: Speedo - by Misiur - 17.03.2015, 19:46
Re: Speedo - by Zonoya - 17.03.2015, 20:09
Re: Speedo - by Misiur - 17.03.2015, 20:44
Re: Speedo - by Zonoya - 18.03.2015, 17:09
Re: Speedo - by SickAttack - 18.03.2015, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)