TextDraw Bug

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
  • Moin Leute,


    ich will meine Auswahl für die Autohäuser mal auf eine neue Art machen! Und zwar mit auswählbaren TextDraws
    habe ich auch soweit hinbekommen! Nur wenn ich über die TextDraws fahre sind manchmal einfach alle oder 3 oder 2 ausgewählt obwohl ich nur über einem bin!


    Hier mal ein Screen:


    Hoffe ihr könnt mir da helfen! Mfg Eric ;)

  • for(new playerid;playerid<MAX_PLAYERS;playerid++)
    {
    GANGAUTOHAUSTEXTDRAW[playerid] = TextDrawCreate(310.000000, 340.000000, " ");
    TextDrawAlignment(GANGAUTOHAUSTEXTDRAW[playerid], 2);
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAW[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAW[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAW[playerid], 0.620000, 1.899999);
    TextDrawColor(GANGAUTOHAUSTEXTDRAW[playerid], 16777215);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAW[playerid], 0);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAW[playerid], 1);
    TextDrawSetShadow(GANGAUTOHAUSTEXTDRAW[playerid], 1);
    TextDrawUseBox(GANGAUTOHAUSTEXTDRAW[playerid], 1);
    TextDrawBoxColor(GANGAUTOHAUSTEXTDRAW[playerid], -1768515996);
    TextDrawTextSize(GANGAUTOHAUSTEXTDRAW[playerid], 968.000000, 710.000000);

    GANGAUTOHAUSTEXTDRAWKAUFEN[playerid] = TextDrawCreate(193.000000, 428.000000, "Kaufen");
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 0.500000, 1.000000);
    TextDrawColor(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], -1);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 1);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 1);


    GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid] = TextDrawCreate(370.000000, 428.000000, "verlassen");
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 0.500000, 1.000000);
    TextDrawColor(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], -1);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 1);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 1);


    GANGAUTOHAUSTEXTDRAWLINKS[playerid] = TextDrawCreate(158.000000, 375.000000, "<--");
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 0.529999, 1.600000);
    TextDrawColor(GANGAUTOHAUSTEXTDRAWLINKS[playerid], -1);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 1);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 1);


    GANGAUTOHAUSTEXTDRAWRECHTS[playerid] = TextDrawCreate(438.000000, 375.000000, "-->");
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 0.529999, 1.600000);
    TextDrawColor(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], -1);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 1);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 1);

    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAW[playerid], false);
    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], true);
    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], true);
    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAWLINKS[playerid], true);
    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], true);
    }


    stock EnterGangautohaus(playerid, frak)


    {
    frak = frak-1;
    new world = 999-playerid;
    SetPlayerVirtualWorld(playerid, world);
    SendClientMessage(playerid, COLOR_GREEN, "WELCOME");
    SetPlayerPos(playerid, GANGAUTOHAUSENTER-10);
    TogglePlayerControllable(playerid, 0);
    TEMPCARID[playerid] = GangKauflist[frak][0];
    TEMPCAR[playerid] = CreateVehicle(TEMPCARID[playerid], GANGAUTOHAUSLOOKAT,GANGAUTOHAUSROTATION,TEMPCOLOR1[playerid],TEMPCOLOR2[playerid],-1);
    SetVehicleVirtualWorld(TEMPCAR[playerid],world);
    SetPlayerCameraPos(playerid,GANGAUTOHAUSCAMPOS);
    SetPlayerCameraLookAt(playerid,GANGAUTOHAUSLOOKAT);
    new string[200];
    format(string,sizeof(string),"~r~Fraktions-Autohaus~n~ ~n~ ~w~%s~n~Preis: %i~g~$~n~ ~n~ ~n~ ~n~ ~n~",GetVehicleName(TEMPCARID[playerid]),GetVehiclePrice(TEMPCARID[playerid]));
    TextDrawSetString(GANGAUTOHAUSTEXTDRAW[playerid],string);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAW[playerid]);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAWKAUFEN[playerid]);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid]);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAWLINKS[playerid]);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAWRECHTS[playerid]);
    SelectTextDraw(playerid, 0x00FF00FF);
    INGANGAUTOHAUS[playerid] = 1;
    GANGAUTOHAUSINDEX[playerid] = 0;
    return 1;
    }


    //EDIT Sorry ging wiedermal mit [pwn] nicht!

  • In PWN!

    for(new playerid;playerid<MAX_PLAYERS;playerid++)
    {
    GANGAUTOHAUSTEXTDRAW[playerid] = TextDrawCreate(310.000000, 340.000000, " ");
    TextDrawAlignment(GANGAUTOHAUSTEXTDRAW[playerid], 2);
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAW[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAW[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAW[playerid], 0.620000, 1.899999);
    TextDrawColor(GANGAUTOHAUSTEXTDRAW[playerid], 16777215);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAW[playerid], 0);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAW[playerid], 1);
    TextDrawSetShadow(GANGAUTOHAUSTEXTDRAW[playerid], 1);
    TextDrawUseBox(GANGAUTOHAUSTEXTDRAW[playerid], 1);
    TextDrawBoxColor(GANGAUTOHAUSTEXTDRAW[playerid], -1768515996);
    TextDrawTextSize(GANGAUTOHAUSTEXTDRAW[playerid], 968.000000, 710.000000);


    GANGAUTOHAUSTEXTDRAWKAUFEN[playerid] = TextDrawCreate(193.000000, 428.000000, "Kaufen");
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 0.500000, 1.000000);
    TextDrawColor(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], -1);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 1);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], 1);


    GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid] = TextDrawCreate(370.000000, 428.000000, "verlassen");
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 0.500000, 1.000000);
    TextDrawColor(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], -1);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 1);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], 1);


    GANGAUTOHAUSTEXTDRAWLINKS[playerid] = TextDrawCreate(158.000000, 375.000000, "<--");
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 0.529999, 1.600000);
    TextDrawColor(GANGAUTOHAUSTEXTDRAWLINKS[playerid], -1);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 1);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAWLINKS[playerid], 1);


    GANGAUTOHAUSTEXTDRAWRECHTS[playerid] = TextDrawCreate(438.000000, 375.000000, "-->");
    TextDrawBackgroundColor(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 255);
    TextDrawFont(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 3);
    TextDrawLetterSize(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 0.529999, 1.600000);
    TextDrawColor(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], -1);
    TextDrawSetOutline(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 1);
    TextDrawSetProportional(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], 1);


    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAW[playerid], false);
    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAWKAUFEN[playerid], true);
    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid], true);
    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAWLINKS[playerid], true);
    TextDrawSetSelectable(GANGAUTOHAUSTEXTDRAWRECHTS[playerid], true);
    }


    stock EnterGangautohaus(playerid, frak)


    {
    frak = frak-1;
    new world = 999-playerid;
    SetPlayerVirtualWorld(playerid, world);
    SendClientMessage(playerid, COLOR_GREEN, "WELCOME");
    SetPlayerPos(playerid, GANGAUTOHAUSENTER-10);
    TogglePlayerControllable(playerid, 0);
    TEMPCARID[playerid] = GangKauflist[frak][0];
    TEMPCAR[playerid] = CreateVehicle(TEMPCARID[playerid], GANGAUTOHAUSLOOKAT,GANGAUTOHAUSROTATION,TEMPCOLOR1[playerid],TEMPCOLOR2[playerid],-1);
    SetVehicleVirtualWorld(TEMPCAR[playerid],world);
    SetPlayerCameraPos(playerid,GANGAUTOHAUSCAMPOS);
    SetPlayerCameraLookAt(playerid,GANGAUTOHAUSLOOKAT);
    new string[200];
    format(string,sizeof(string),"~r~Fraktions-Autohaus~n~ ~n~ ~w~%s~n~Preis: %i~g~$~n~ ~n~ ~n~ ~n~ ~n~",GetVehicleName(TEMPCARID[playerid]),GetVehiclePrice(TEMPCARID[playerid]));
    TextDrawSetString(GANGAUTOHAUSTEXTDRAW[playerid],string);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAW[playerid]);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAWKAUFEN[playerid]);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAWVERLASSEN[playerid]);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAWLINKS[playerid]);
    TextDrawShowForPlayer(playerid,GANGAUTOHAUSTEXTDRAWRECHTS[playerid]);
    SelectTextDraw(playerid, 0x00FF00FF);
    INGANGAUTOHAUS[playerid] = 1;
    GANGAUTOHAUSINDEX[playerid] = 0;
    return 1;
    }

    RTL - Das N steht für Niveau!
    MfG,
    StreetS


    Jegliche Freundesanfragen, die für mich keinen Sinn ergeben, werden professionell Ignoriert. (Gleiche mit Skype!)
    Wer es nicht kapiert wird in Breadfish & Skype blockiert.


    - Stolzer PAWN Scripter der Klasse Beherrscht