public TachoT(Player)
{
if(IsPlayerInAnyVehicle(Player))
{
new veh = GetPlayerVehicleID(Player);
TextDrawHideForPlayer(Player, Tacho[Player]);
new Tachostring[10];
new Float:Geschwindigkeit;
new Float:TX[MAX_PLAYERS];
new Float:TY[MAX_PLAYERS];
new Float:TZ[MAX_PLAYERS];
GetVehicleVelocity(veh, TX[Player], TY[Player], TZ[Player]);
carhealth = GetVehicleHealth(veh);
Geschwindigkeit = floatsqroot(TX[Player]*TX[Player] + TY[Player]*TY[Player] + TZ[Player]*TZ[Player]) * 100 * 1.9;
format(Tachostring, sizeof(Tachostring), "Km/h: %d\nZustand: %d", floatround(Geschwindigkeit,carhealth[GetVehicleHealth]));
Tacho[Player] = TextDrawCreate(536.0,403.0,Tachostring);
TextDrawUseBox(Tacho[Player] , 1);
TextDrawBoxColor(Tacho[Player],SCHWARZ);
TextDrawShowForPlayer(Player, Tacho[Player]);
}else{
TextDrawHideForPlayer(Player, Tacho[Player]);
KillTimer(TachoTimer[Player]);
}
}
so hab cih mein tacho er angefangen er zeigt mir aber fehler
Fehler
C:\Users\Alex\Desktop\GTA Server\gamemodes\testserver.pwn(4018) : error 017: undefined symbol "carhealth"
C:\Users\Alex\Desktop\GTA Server\gamemodes\testserver.pwn(4018) : warning 202: number of arguments does not match definition
C:\Users\Alex\Desktop\GTA Server\gamemodes\testserver.pwn(4020) : error 017: undefined symbol "carhealth"
C:\Users\Alex\Desktop\GTA Server\gamemodes\testserver.pwn(4020) : error 076: syntax error in the expression, or invalid function call
C:\Users\Alex\Desktop\GTA Server\gamemodes\testserver.pwn(4020) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\GTA Server\gamemodes\testserver.pwn(4020) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Zeilen
carhealth = GetVehicleHealth(veh);
format(Tachostring, sizeof(Tachostring), "Km/h: %d\nZustand: %d", floatround(Geschwindigkeit,carhealth[GetVehicleHealth]));
ich danke im voraus