Einstellungen Funtkioniert nicht

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
  • Guten Abend,
    ich habe etwas gescriptet damit man nicht immer Befehle eingeben muss, sondern einfach eine Taste drücken kann. Dies kann man dann einstellen mit klickbare Textdraws allerdings funktioniert das nicht.


    Code;


    TDEditor_PTD[playerid][18] = CreatePlayerTextDraw(playerid, 217.133605, 260.630401, "Apanel_mit_]c]_oeffnen");
    PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][18], 0.222332, 0.757924);
    PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][18], 1);
    PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][18], -1);
    PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][18], 0);
    PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][18], 0);
    PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][18], 255);
    PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][18], 2);
    PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][18], 1);
    PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][18], 0);


    TDEditor_PTD[playerid][19] = CreatePlayerTextDraw(playerid, 374.542968, 260.730407, "Nein");
    PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][19], 0.222332, 0.757924);
    PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][19], 1);
    PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][19], -1);
    PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][19], 0);
    PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][19], 0);
    PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][19], 255);
    PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][19], 2);
    PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][19], 1);
    PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][19], 0);
    PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][19], true);



    TDEditor_PTD[playerid][21] = CreatePlayerTextDraw(playerid, 352.541625, 260.433441, "Ja");
    PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][21], 0.222332, 0.757924);
    PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][21], 1);
    PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][21], -1);
    PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][21], 0);
    PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][21], 0);
    PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][21], 255);
    PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][21], 2);
    PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][21], 1);
    PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][21], 0);
    PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][21], true);






    public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
    {
    if(playertextid == TDEditor_PTD[playerid][21]) // JA APANEL
    {
    Spieler[playerid][sAPANEL] = 1;
    PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][18]);
    PlayerTextDrawSetString(playerid,TDEditor_PTD[playerid][18],"~g~Apanel_mit_]c]_oeffnen"); // DAS FUNKTIONIERT KOMISCHERWEISE AUCH NICHT
    PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][18]);
    return 1;
    }
    else if(playertextid == TDEditor_PTD[playerid][19]) // NEIN APANEL
    {
    Spieler[playerid][sAPANEL] = 0;
    PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][18]);
    PlayerTextDrawSetString(playerid,TDEditor_PTD[playerid][18],"~r~Apanel_mit_]c]_oeffnen"); // DAS FUNKTIONIERT KOMISCHERWEISE AUCH NICHT
    PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][18]);
    return 1;
    }






    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if(newkeys & KEY_CROUCH)
    {
    if(Spieler[playerid][sAPANEL] == 1)
    {
    if(Spieler[playerid][Admin] <= 1)
    {
    ShowPlayerDialog(playerid,DIALOG_ADMINPANEL,DIALOG_STYLE_LIST,"Adminpanel","Admin ON/OFF Duty\nTicket Support ON/OFF Duty\nSupmobil\nSpieler kicken","Auswählen","Abbrechen");
    return 1;
    }


    if(Spieler[playerid][Admin] <= 2)
    {
    ShowPlayerDialog(playerid,DIALOG_ADMINPANEL,DIALOG_STYLE_LIST,"Adminpanel","Admin ON/OFF Duty\nTicket Support ON/OFF Duty\nSupmobil\nSpieler kicken\nSpieler bannen","Auswählen","Abbrechen");
    return 1;
    }


    if(Spieler[playerid][Admin] <= 3)
    {
    ShowPlayerDialog(playerid,DIALOG_ADMINPANEL,DIALOG_STYLE_LIST,"Adminpanel","Admin ON/OFF Duty\nTicket Support ON/OFF Duty\nSupmobil\nSpieler kicken\nSpieler bannen\nAlle Spieler Leben geben\nAlle Spieler Armour geben","Auswählen","Abbrechen");
    return 1;
    }
    if(Spieler[playerid][Admin] <= 4)
    {
    ShowPlayerDialog(playerid,DIALOG_ADMINPANEL,DIALOG_STYLE_LIST,"Adminpanel","Admin ON/OFF Duty\nTicket Support ON/OFF Duty\nSupmobil\nSpieler kicken\nSpieler bannen\nAlle Spieler Leben geben\nAlle Spieler Armour geben\nAlle Spieler kicken\nServer restarten","Auswählen","Abbrechen");
    return 1;
    }
    if(Spieler[playerid][Admin] <= 5)
    {
    ShowPlayerDialog(playerid,DIALOG_ADMINPANEL,DIALOG_STYLE_LIST,"Adminpanel","Admin ON/OFF Duty\nTicket Support ON/OFF Duty\nSupmobil\nSpieler kicken\nSpieler bannen\nAlle Spieler Leben geben\nAlle Spieler Armour geben\nAlle Spieler kicken\nServer restarten\nServer Passwort setzen/ändern\nServer Hostname ändern\nServer Weburl ändern\nAdmin Rangname ändern","Auswählen","Abbrechen");
    return 1;
    }
    }
    }




    Und hier der Befehl:


    ocmd:settings(playerid,params[])
    {
    if(Spieler[playerid][Eingeloggt] == 1)
    {
    if(open[playerid] == 0)
    {
    if(Spieler[playerid][sAutoLogin] == 0)
    {
    PlayerTextDrawSetString(playerid,TDEditor_PTD[playerid][3],"~r~Auto_Login");
    }
    else if(Spieler[playerid][sAutoLogin] == 1)
    {
    PlayerTextDrawSetString(playerid,TDEditor_PTD[playerid][3],"~g~Auto_Login");
    }
    if(Spieler[playerid][sHUD] == 0)
    {
    PlayerTextDrawSetString(playerid,TDEditor_PTD[playerid][7],"~r~HUD");
    }
    else if(Spieler[playerid][sHUD] == 1)
    {
    PlayerTextDrawSetString(playerid,TDEditor_PTD[playerid][7],"~g~HUD");
    }


    if(Spieler[playerid][sAPANEL] == 0)
    {
    PlayerTextDrawSetString(playerid,TDEditor_PTD[playerid][18],"~r~Apanel_mit_]c]_oeffnen");
    }
    else if(Spieler[playerid][sAPANEL] == 1)
    {
    PlayerTextDrawSetString(playerid,TDEditor_PTD[playerid][18],"~g~Apanel_mit_]c]_oeffnen");
    }
    if(Spieler[playerid][Admin] >= 1 )
    {
    PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][17]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][18]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][19]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][20]);
    PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][21]);
    }
    PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][0]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][1]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][2]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][3]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][4]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][5]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][6]);
    PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][7]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][8]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][9]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][10]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][11]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][12]); /*PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][13]);
    PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][14]); PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][15]);*/ PlayerTextDrawShow(playerid,TDEditor_PTD[playerid][16]);
    SelectTextDraw(playerid, 0xA3B4C5FF);
    open[playerid] = 1;
    SendClientMessage(playerid,Hinweis,"Tippe erneut /settings, um die einstellungen zu beenden");
    SendClientMessage(playerid,Hinweis,"Rot: Deaktiviert, Grün: Aktiviert. Klicke jeweils auf 'Ja' oder 'Nein'");


    return 1;
    }
    if(open[playerid] == 1)
    {
    open[playerid] = 0;
    PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][0]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][1]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][2]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][3]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][4]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][5]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][6]);
    PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][7]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][8]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][9]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][10]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][11]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][12]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][13]);
    PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][14]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][15]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][16]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][17]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][18]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][19]); PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][20]);
    PlayerTextDrawHide(playerid,TDEditor_PTD[playerid][21]);
    CancelSelectTextDraw(playerid);
    return 1;
    }
    }
    return 1;
    }