hey ich hab mein Tacho leicht bearbeitet und ja seit Kurzen ca 1Woche Funktioniert er nicht mehr ich Finde den Fehler auch nicht
public TachoTime()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
for(new o = 0; o < MAX_VEHICLES; o++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
new Float:Entfernung, Float:Geschwindigkeit;
GetVehiclePos(GetPlayerVehicleID(i), X1[i], Y1[i], Z1[i]);
Entfernung = floatsqroot(floatpower(floatabs(floatsub(X1[i], X2[i])), 2)+floatpower(floatabs(floatsub(Y1[i], Y2[i])), 2)+floatpower(floatabs(floatsub(Z1[i], Z2[i])), 2));
Geschwindigkeit = (Entfernung / (TACHOTIMER/1000)) * 3.6;
new Tachostring[20];
if(Autos[o][i][AutoHausHP] >= 999.0)
{
format(Tachostring, sizeof(Tachostring), "Zustand:~g~%.1f Km/h: %d", Autos[o][i][AutoHausHP],floatround(Geschwindigkeit));
TextDrawSetString(Tacho[i], Tachostring);
GetVehiclePos(GetPlayerVehicleID(i), X2[i], Y2[i], Z2[i]);
}
else if(Autos[o][i][AutoHausHP] >= 750.0 && Autos[i][i][AutoHausHP] < 999.0)
{
format(Tachostring, sizeof(Tachostring), "Zustand:~g~%.1f Km/h: %d", Autos[o][i][AutoHausHP],floatround(Geschwindigkeit));
TextDrawSetString(Tacho[i], Tachostring);
GetVehiclePos(GetPlayerVehicleID(i), X2[i], Y2[i], Z2[i]);
}
else if(Autos[o][i][AutoHausHP] >= 375.0 && Autos[i][i][AutoHausHP] < 750.0)
{
format(Tachostring, sizeof(Tachostring), "Zustand:~y~%.1f Km/h: %d", Autos[o][i][AutoHausHP],floatround(Geschwindigkeit));
TextDrawSetString(Tacho[i], Tachostring);
GetVehiclePos(GetPlayerVehicleID(i), X2[i], Y2[i], Z2[i]);
}
}
else
{
TextDrawHideForPlayer(i, Tacho[i]);
}
}
}
return 1;
}
Unter OnPlayerEnterVehicle
for(new i = 0; i < MAX_PLAYERS; i++)
{
Tacho[i] = TextDrawCreate(386.0,410, "_");
TextDrawLetterSize(Tacho[i], 0.4, 1.1);
TextDrawFont(Tacho[i], 1);
TextDrawSetShadow(Tacho[i], 2);
TextDrawSetOutline(Tacho[i],1);
}
OnGameModeInit
SetTimer("TachoTime",1000,1);
kann mir da wer helfen
lg kifkat