Speedometer is lost.
#3

Код:
public Speedometer()
{
 for(new i = 0; i < MAX_PLAYERS; i++)
        {


			new vehicleid, Float:health;
			new fstring[32], string[512];

			if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
				{
					vehicleid = GetPlayerVehicleID(i);
					GetVehicleHealth(vehicleid, health);
					GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);

					string = "~w~";
					strcat(string, "~w~~h~Benzin: ~g~", sizeof(string));
					fstring = "iiiiiiiiii";
					if(Fuel[vehicleid] > 100.0) strins(fstring, "~r~", 10, sizeof(fstring));
					else if(Fuel[vehicleid] < 0.0) strins(fstring, "~r~", 0, sizeof(fstring));
					else strins(fstring, "~r~", floatround(Fuel[vehicleid]/10.0), sizeof(fstring));
					strcat(string, fstring, sizeof(string));
			
					strcat(string, "~n~~w~~h~", sizeof(string));
					if(GetPVarInt(i, "Speedo")) format(fstring,sizeof(fstring),"mph: ~w~%d", GetPlayerSpeed(i, false));
					else format(fstring,sizeof(fstring),"kph: ~w~%d", GetPlayerSpeed(i, true));
					strcat(string, fstring, sizeof(string));

					TextDrawSetString(SpeedoText[i], string);
				}
		}
}
Reply


Messages In This Thread
Speedometer is lost. - by Supernovaa - 29.10.2015, 13:30
Re: Speedometer is lost. - by Ritzy2K - 29.10.2015, 13:33
Re: Speedometer is lost. - by Supernovaa - 29.10.2015, 13:36
Re: Speedometer is lost. - by SecretBoss - 29.10.2015, 13:36
Re: Speedometer is lost. - by Supernovaa - 29.10.2015, 13:44
AW: Speedometer is lost. - by Mencent - 29.10.2015, 13:44
Re: Speedometer is lost. - by Supernovaa - 29.10.2015, 13:49
AW: Speedometer is lost. - by Mencent - 29.10.2015, 13:55
Re: Speedometer is lost. - by Supernovaa - 29.10.2015, 14:03
AW: Speedometer is lost. - by Mencent - 29.10.2015, 14:05

Forum Jump:


Users browsing this thread: 1 Guest(s)