05.04.2011, 10:44
Hi, i made a speedometer and every thing works fine, but it show's not the players speed but all players speed, so while you are playing alone it works fine. I use:
I don't have idea's what may be wrong.
pawn Код:
public Speed(playerid)
{
new
vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid != 0)
{
new string[64],string1[32];
format(string1,sizeof(string1), "Fuel: %il", VehicleFuel[vehicleid]);
format(string,sizeof(string), "Speed: %d km/h", GetPlayerSpeed(playerid,false));
TextDrawSetString(textdraws[Textdraw0][playerid],string);
TextDrawSetString(textdraws[Textdraw2][playerid],string1);
return 1;
}
else
{
TextDrawSetString(textdraws[Textdraw0][playerid],"");
TextDrawSetString(textdraws[Textdraw2][playerid],"");
}
return 1;
}