Hi,
ich habe bei meinem Tacho ein Problem. Und zwar zieht sich der String der Tankanzeige (siehe Screen 1) über 2 anstatt der gewollten 1 Zeile (siehe Screen 2).
Erstellung:
Tacho0[playerid] = CreatePlayerTextDraw(playerid, 250.799835, 359.893280, "Geschwingidkeit: 100 km/h~n~Tankinhalt: ~g~I I I I I I I I I I~w~ (150/150L)~n~Zustand: 100%~n~Fahrzeug: Linerunner~n~Kilometer: 1.6 KM");
PlayerTextDrawLetterSize(playerid, Tacho0[playerid], 0.242397, 1.057417);
PlayerTextDrawTextSize(playerid, Tacho0[playerid], 407.600097, 19.911113);
PlayerTextDrawAlignment(playerid, Tacho0[playerid], 1);
PlayerTextDrawColor(playerid, Tacho0[playerid], -1);
PlayerTextDrawSetShadow(playerid, Tacho0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Tacho0[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Tacho0[playerid], 51);
PlayerTextDrawFont(playerid, Tacho0[playerid], 1);
PlayerTextDrawSetProportional(playerid, Tacho0[playerid], 1);
Änderung des Strings:
switch(Tank[veh]/(MaxTank[(modelid)-400]/10))
{
case 10,11: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 9: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I I I I ~r~I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 8: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I I I ~r~I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 7: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I I ~r~I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 6: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I ~r~I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 5: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I ~r~I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 4: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I ~r~I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 3: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I ~r~I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 2: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I ~r~I I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 1: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I ~r~I I I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 0: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~r~I I I I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
}
PlayerTextDrawSetString(i, Tacho0[i], string);
Tacho0[playerid] = CreatePlayerTextDraw(playerid, 250.799835, 359.893280, "Geschwingidkeit: 100 km/h~n~Tankinhalt: ~g~I I I I I I I I I I~w~ (150/150L)~n~Zustand: 100%~n~Fahrzeug: Linerunner~n~Kilometer: 1.6 KM");
PlayerTextDrawLetterSize(playerid, Tacho0[playerid], 0.242397, 1.057417);
PlayerTextDrawTextSize(playerid, Tacho0[playerid], 407.600097, 19.911113);
PlayerTextDrawAlignment(playerid, Tacho0[playerid], 1);
PlayerTextDrawColor(playerid, Tacho0[playerid], -1);
PlayerTextDrawSetShadow(playerid, Tacho0[playerid], 0);
PlayerTextDrawSetOutline(playerid, Tacho0[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Tacho0[playerid], 51);
PlayerTextDrawFont(playerid, Tacho0[playerid], 1);
PlayerTextDrawSetProportional(playerid, Tacho0[playerid], 1);
Änderung des Strings:
switch(Tank[veh]/(MaxTank[(modelid)-400]/10))
{
case 10,11: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 9: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I I I I ~r~I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 8: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I I I ~r~I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 7: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I I ~r~I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 6: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I I ~r~I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 5: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I I ~r~I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 4: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I I ~r~I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 3: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I I ~r~I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 2: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I I ~r~I I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 1: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~g~I ~r~I I I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
case 0: format(string,sizeof string,"Geschwingidkeit: %d km/h~n~Tankinhalt: ~r~I I I I I I I I I I~w~ (%d/%dL)~n~Zustand: %d%%~n~Fahrzeug: %s~n~Kilometer: %s",kmh,Tank[veh],MaxTank[(modelid)-400],chealth,PlayerVehicle[modelid - 400],string);
}
PlayerTextDrawSetString(i, Tacho0[i], string);
Es ist ab 100 Liter aufwärts so.
Woran liegts?
lg
Deagle