Hallo erstmal,
ich habe das Tutorial Tacho erstellen gemacht aber es erscheint nicht oO
hier der Code
public Tacho(i){ if(IsPlayerConnected(i) && !IsPlayerNPC(i) && IsPlayerInAnyVehicle(i)) { new string[4][128],Float:Entfernung,Float:Geschwindigkeit; new Float:X1[MAX_PLAYERS],Float:X2[MAX_PLAYERS],Float:Y1[MAX_PLAYERS],Float:Y2[MAX_PLAYERS],Float:Z1[MAX_PLAYERS],Float:Z2[MAX_PLAYERS];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/(TachoTime/1000)) * 3.6; format(string[0],128,"Km/h: %d",floatround(Geschwindigkeit)); TextDrawSetString(TachoKmh[i],string[0]); GetVehiclePos(GetPlayerVehicleID(i),X2[i],Y2[i],Z2[i]); if(IstEinAuto(GetPlayerVehicleID(i))) { format(string[1],128,"Elektro: %d",Treibstoff[GetPlayerVehicleID(i)]);}if(IstEinMotorrad(GetPlayerVehicleID(i))){ format(string[1],128,"Elektro: %d",Treibstoff[GetPlayerVehicleID(i)]);}if(IstEinBoot(GetPlayerVehicleID(i))){ format(string[1],128,"Benzin: %d",Treibstoff[GetPlayerVehicleID(i)]);}if(IstEinLKW(GetPlayerVehicleID(i))){ format(string[1],128,"Diesel: %d",Treibstoff[GetPlayerVehicleID(i)]);}if(IsAPlane(GetPlayerVehicleID(i))){ format(string[1],128,"Kerosin: %d",Treibstoff[GetPlayerVehicleID(i)]);}new Float:Vhp;GetVehicleHealth(GetPlayerVehicleID(i),Vhp);format(string[2],128,"Zustand: %d",floatround(Vhp));format(string[3],128,"Name: %s",Carname[GetPlayerVehicleID(i)-400]);TextDrawSetString(TachoBenzin[i],string[1]);TextDrawSetString(TachoZustand[i],string[2]);TextDrawSetString(TachoName[i],string[3]);TextDrawShowForPlayer(i,TachoBy[i]);TextDrawShowForPlayer(i,TachoKmh[i]);TextDrawShowForPlayer(i,TachoBenzin[i]);TextDrawShowForPlayer(i,TachoZustand[i]);TextDrawShowForPlayer(i,TachoName[i]);}else{ TextDrawHideForPlayer(i,TachoBy[i]);TextDrawHideForPlayer(i,TachoKmh[i]);TextDrawHideForPlayer(i,TachoBenzin[i]);TextDrawHideForPlayer(i,TachoZustand[i]);TextDrawHideForPlayer(i,TachoName[i]);}return 1;}