Mein Script sagt mir das Der Pawn compiler wegen Diesen Abschnitt nicht geht keine ahnung warum Bitte Helfen
Function Timer2()
{
new Float:Speedo_X,Float:Speedo_Y,Float:Speedo_Z;
new Float:Speedo_HP;
for(new i=0; i<SLOTS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && !IsANoTachoVehicle(GetPlayerVehicleID(i)))
{
GetPlayerPos(i, Speedo_X, Speedo_Y, Speedo_Z);
GetPlayerVehicleID(i);
GetVehicleHealth(GetPlayerVehicleID(i), Speedo_HP);
new str1[256],str2[256],str3[256],str4[256];
if(SpeedoON == 0)
{
TextDrawShowForPlayer(i, box); TextDrawShowForPlayer(i, fahrzeug); TextDrawShowForPlayer(i, kmh);
TextDrawShowForPlayer(i, hoehe); TextDrawShowForPlayer(i, zustand);
SpeedoON = 1;
}
new Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,final_speed_int;
new veh = GetPlayerVehicleID(i);
GetVehicleVelocity(veh, speed_x, speed_y, speed_z);
final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667; // 136.666667 = kmph // 85.4166672= mph
final_speed_int = floatround(final_speed,floatround_round);
new kmh_anzahl = final_speed_int;
format(str1,sizeof(str1),"Fahrzeug: ~y~%s",VehicleName[GetVehicleModel(GetPlayerVehicleID(i))-400]);
TextDrawSetString(fahrzeug, str1);
if(kmh_anzahl >= 150)
{
format(str2,sizeof(str2),"KM/H: ~r~%d",kmh_anzahl);
TextDrawSetString(kmh, str2);
}
else if(kmh_anzahl >= 90)
{
format(str2,sizeof(str2),"KM/H: ~y~%d",kmh_anzahl);
TextDrawSetString(kmh, str2);
}
else if(kmh_anzahl >= 40)
{
format(str2,sizeof(str2),"KM/H: ~g~%d",kmh_anzahl);
TextDrawSetString(kmh, str2);
}
else
{
format(str2,sizeof(str2),"KM/H: ~b~%d",kmh_anzahl);
TextDrawSetString(kmh, str2);
}
new vehicleid = GetPlayerVehicleID(i);
format(str3,sizeof(str3),"Tank: ~g~%d / %d Liter", Gas[vehicleid],GetGasMax(GetVehicleModel(vehicleid)));
TextDrawSetString(hoehe, str3);
if(Speedo_HP >= 551)
{
format(str4,sizeof(str4),"Zustand: ~g~%.2f", Speedo_HP);
TextDrawSetString(zustand, str4);
}
else if(Speedo_HP >= 361)
{
format(str4,sizeof(str4),"Zustand: ~y~%.2f", Speedo_HP);
TextDrawSetString(zustand, str4);
}
else
{
format(str4,sizeof(str4),"Zustand: ~r~%.2f", Speedo_HP);
TextDrawSetString(zustand, str4);
}
}
SavePlayerPos[sX] = Speedo_X, SavePlayerPos[sY] = Speedo_Y, SavePlayerPos[sZ] = Speedo_Z;
}
for(new i=0; i<SLOTS; i++)
{
if(!IsPlayerInAnyVehicle(i))
{
TextDrawHideForPlayer(i, box); TextDrawHideForPlayer(i, fahrzeug); TextDrawHideForPlayer(i, kmh);
TextDrawHideForPlayer(i, hoehe); TextDrawHideForPlayer(i, zustand);
SpeedoON = 0;
}
}
return 1;
}