Bei mir wird der Zustand nicht angezeigt!

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
  • Ganz oben:new Text:ZUSTAND;
    new Text:TextZUSTAND[MAX_PLAYERS];


    OnGameModeInit:
    ZUSTAND = TextDrawCreate(500.000000, 381.000000, "Zustand: ");
    TextDrawBackgroundColor(ZUSTAND, 255);
    TextDrawFont(ZUSTAND, 1);
    TextDrawLetterSize(ZUSTAND, 0.300000, 0.799999);
    TextDrawColor(ZUSTAND, -1);
    TextDrawSetOutline(ZUSTAND, 0);
    TextDrawSetProportional(ZUSTAND, 1);
    TextDrawSetShadow(ZUSTAND, 1);
    TextDrawUseBox(ZUSTAND, 1);
    TextDrawBoxColor(ZUSTAND, 225);
    TextDrawTextSize(ZUSTAND, 605.000000, 0.000000);


    for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
    { TextZUSTAND[playerid] = TextDrawCreate(500.000000, 392.000000, " ");
    TextDrawBackgroundColor(TextZUSTAND[playerid], 255);
    TextDrawFont(TextZUSTAND[playerid], 1);
    TextDrawLetterSize(TextZUSTAND[playerid], 0.300000, 0.799999);
    TextDrawColor(TextZUSTAND[playerid], -1);
    TextDrawSetOutline(TextZUSTAND[playerid], 0);
    TextDrawSetProportional(TextZUSTAND[playerid], 1);
    TextDrawSetShadow(TextZUSTAND[playerid], 1);
    TextDrawUseBox(TextZUSTAND[playerid], 1);
    TextDrawBoxColor(TextZUSTAND[playerid], 225);
    TextDrawTextSize(TextZUSTAND[playerid], 605.000000, 0.000000);
    }


    Wenn er im Auto ist:
    if(newstate == PLAYER_STATE_DRIVER)
    {
    TextDrawShowForPlayer(playerid,ZUSTAND);
    TextDrawShowForPlayer(playerid,TextZUSTAND[playerid]);
    }
    if(oldstate == PLAYER_STATE_DRIVER)
    {
    TextDrawHideForPlayer(playerid,ZUSTAND);
    TextDrawHideForPlayer(playerid,TextZUSTAND[playerid]);
    }



    Public:
    forward Zustand();
    public Zustand()
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerState(i) == 2)
    {
    new veh, Float:health;
    GetPlayerVehicleID(i);
    GetVehicleHealth(veh,health);
    new Tachostring[256];
    format(Tachostring, sizeof(Tachostring), "Zustand: %.2f",health);
    TextDrawSetString(TextZUSTAND[i], Tachostring);
    }
    }
    return 1;
    }




    MfG

  • forward Zustand();
    public Zustand()
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerInAnyVehicle(i) && GetPlayerState(i) == 2)
    {
    new Float:health, veh = GetPlayerVehicleID(i);//veh hatte keine zuweisung
    GetVehicleHealth(veh,health);
    new Tachostring[50];//50 reicht vollkommen aus
    format(Tachostring, sizeof(Tachostring), "Zustand: %.2f",health);
    TextDrawSetString(TextZUSTAND[i], Tachostring);
    }
    }
    return 1;
    }

    All in all it's just another brick in the wall

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen