TextDraw geht nimmer weg

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • hiho,


    Ich hab noch ne lezte Frage und zwar hab ich jetz ein Fuel System gemacht. Funktioniert Prima. Aber wenn ich dann das Auto verlassen geht es nimmer weg das TextDraw. Kann man das so machen das das TextDraw beim verlassen des Autos verschwindet ?

    Mit freundlichen Grüßen

  • Sry hab mich vertan statt TextDraw is da sowas drinnen


    public BenzinUpdate()
    {
    new string[256];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    new vehicle = GetPlayerVehicleID(i);
    if(IsPlayerInAnyVehicle(i) == 1)
    {
    if(Gas[vehicle] >= 0 && Gas[vehicle] <= 0)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~r~IIIIIIIIII ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    RemovePlayerFromVehicle(i);
    }
    if(Gas[vehicle] >= 0 && Gas[vehicle] <= 10)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~I~r~IIIIIIIII ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    if(Gas[vehicle] >= 10 && Gas[vehicle] <= 20)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~II~r~IIIIIIII ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    else if(Gas[vehicle] >= 20 && Gas[vehicle] <= 30)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~III~r~IIIIIII ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    else if(Gas[vehicle] >= 30 && Gas[vehicle] <= 40)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~IIII~r~IIIIII ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    else if(Gas[vehicle] >= 40 && Gas[vehicle] <= 50)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~IIIII~r~IIIII ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    else if(Gas[vehicle] >= 50 && Gas[vehicle] <= 60)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~IIIIII~r~IIII ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    else if(Gas[vehicle] >= 60 && Gas[vehicle] <= 70)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~IIIIIII~r~III ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    else if(Gas[vehicle] >= 70 && Gas[vehicle] <= 80)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~IIIIIIII~r~II ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    else if(Gas[vehicle] >= 80 && Gas[vehicle] <= 90)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~IIIIIIIII~r~I ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    else if(Gas[vehicle] >= 90 && Gas[vehicle] <= 100)
    {
    format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Benzin:~g~IIIIIIIIII ~w~%d%",Gas[vehicle]);
    GameTextForPlayer(i,string,15500,3);
    }
    }
    }
    }
    return 1;
    }

    Mit freundlichen Grüßen