/stats befehl ändern kann mir bitte jemand helfen

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
  • Hallo ich habe ein /stats befehl aber möchte den ändern das der so ist wie auf jeden Server also halt ne Box aber ich brauche hilfe weil bin anfänger :D!


    Das hier ist der /stats befehl den ich ändern will!


    dcmd_stats(playerid,params[])
    {
    #pragma unused params
    ShowPlayerDialog(playerid,DIALOG_STATS0,DIALOG_STYLE_LIST,"Statistik","Persönliches\nFraktionen\nFinanzen\nStatistik\nLizenzen\nImmobilien","Auswählen","Abbrechen");
    return 1;
    }


    if(dialogid == DIALOG_STATS0)
    {
    if(response)
    {
    new Respektlevel = 4;
    new sstr1[65],sstr2[65],sstr3[65],sstr4[65],sstr5[65],sstr6[65],sstr7[65],sstr8[65],sstrall16[900];
    if(listitem == 0)
    {
    new Geschlechtt[30];
    if(SInfo[playerid][pGeschlecht] == 0) { Geschlechtt = "---"; }
    if(SInfo[playerid][pGeschlecht] == 1) { Geschlechtt = "Männlich"; }
    if(SInfo[playerid][pGeschlecht] == 2) { Geschlechtt = "Weiblich"; }
    GetPlayerName(playerid,pname,sizeof(pname));
    format(sstr1,sizeof(sstr1),"{FF5A00}Personalien von: %s",pname);
    format(sstr2,sizeof(sstr2),"{FEFEFE}Geschlecht: %s",Geschlechtt);//Alter
    format(sstr3,sizeof(sstr3),"{FEFEFE}Alter: %d",SInfo[playerid][pAlter]);//Alter
    format(sstr4,sizeof(sstr4),"{FEFEFE}Level: %d",SInfo[playerid][pLevel]);//Alter
    format(sstr5,sizeof(sstr5),"{FEFEFE}Respekt: %d/%d",SInfo[playerid][pRespekt],SInfo[playerid][pLevel]*Respektlevel);//Level + Respekt
    format(sstr6,sizeof(sstr6),"{FEFEFE}PayDay: %d/60",SInfo[playerid][pPayday]);//Payday
    format(sstrall16,sizeof(sstrall16),"%s\n\n%s\n%s\n%s\n%s\n%s\n",sstr1,sstr2,sstr3,sstr4,sstr5,sstr6);
    ShowPlayerDialog(playerid,DIALOG_STATS1,DIALOG_STYLE_MSGBOX,"Personalien",sstrall16,"Schließen","");
    }

    if(listitem == 1)
    {
    new Leadername[40];
    if(SInfo[playerid][pLeader] == 0) { Leadername = "---"; }
    if(SInfo[playerid][pLeader] == 1) { Leadername = "SAPD"; }
    if(SInfo[playerid][pLeader] == 2) { Leadername = "Bundeswehr"; }
    if(SInfo[playerid][pLeader] == 3) { Leadername = "Fahrschule"; }
    if(SInfo[playerid][pLeader] == 4) { Leadername = "Vagos"; }
    if(SInfo[playerid][pLeader] == 5) { Leadername = "Ballas"; }
    if(SInfo[playerid][pLeader] == 6) { Leadername = "Grove Street"; }
    if(SInfo[playerid][pLeader] == 7) { Leadername = "LCN"; }
    if(SInfo[playerid][pLeader] == 8) { Leadername = "Ordnungsamt"; }
    if(SInfo[playerid][pLeader] == 9) { Leadername = "Rettungsdienst"; }
    if(SInfo[playerid][pLeader] == 10) { Leadername = "Yakuza"; }
    if(SInfo[playerid][pLeader] == 11) { Leadername = "Hitman"; }
    if(SInfo[playerid][pLeader] == 12) { Leadername = "Terroristen"; }
    if(SInfo[playerid][pLeader] == 13) { Leadername = "Russische Mafia"; }
    if(SInfo[playerid][pLeader] == 14) { Leadername = "CNN"; }
    if(SInfo[playerid][pLeader] == 15) { Leadername = "LV Rifa"; }
    if(SInfo[playerid][pLeader] == 16) { Leadername = "F.B.I"; }
    if(SInfo[playerid][pLeader] == 17) { Leadername = "Transport GmbH"; }
    if(SInfo[playerid][pLeader] == 18) { Leadername = "Präsident"; }
    new Membername[40];
    if(SInfo[playerid][pMember] == 0) { Membername = "---"; }
    if(SInfo[playerid][pMember] == 1) { Membername = "SAPD"; }
    if(SInfo[playerid][pMember] == 2) { Membername = "Bundeswehr"; }
    if(SInfo[playerid][pMember] == 3) { Membername = "Fahrschule"; }
    if(SInfo[playerid][pMember] == 4) { Membername = "Vagos"; }
    if(SInfo[playerid][pMember] == 5) { Membername = "Ballas"; }
    if(SInfo[playerid][pMember] == 6) { Membername = "Grove Street"; }
    if(SInfo[playerid][pMember] == 7) { Membername = "LCN"; }
    if(SInfo[playerid][pMember] == 8) { Membername = "Ordnungsamt"; }
    if(SInfo[playerid][pMember] == 9) { Membername = "Rettungsdienst"; }
    if(SInfo[playerid][pMember] == 10) { Membername = "Yakuza"; }
    if(SInfo[playerid][pMember] == 11) { Membername = "Hitman"; }
    if(SInfo[playerid][pMember] == 12) { Membername = "Terroristen"; }
    if(SInfo[playerid][pMember] == 13) { Membername = "Russische Mafia"; }
    if(SInfo[playerid][pMember] == 14) { Membername = "CNN"; }
    if(SInfo[playerid][pMember] == 15) { Membername = "LV Rifa"; }
    if(SInfo[playerid][pMember] == 16) { Membername = "F.B.I"; }
    if(SInfo[playerid][pMember] == 17) { Membername = "Transport GmbH"; }
    if(SInfo[playerid][pMember] == 18) { Membername = "Präsident"; }
    new Jobname[60];
    if(SInfo[playerid][pJob] == 0) { Jobname = "---"; }
    if(SInfo[playerid][pJob] == 1) { Jobname = "Müllmann"; }
    if(SInfo[playerid][pJob] == 2) { Jobname = "Taschendieb"; }
    if(SInfo[playerid][pJob] == 3) { Jobname = "Straßenreiniger"; }
    if(SInfo[playerid][pJob] == 4) { Jobname = "Waffendealer"; }
    if(SInfo[playerid][pJob] == 5) { Jobname = "Drogendealer"; }
    if(SInfo[playerid][pJob] == 6) { Jobname = "Farmer"; }
    if(SInfo[playerid][pJob] == 7) { Jobname = "Pilot"; }
    if(SInfo[playerid][pJob] == 8) { Jobname = "Hure"; }
    if(SInfo[playerid][pJob] == 9) { Jobname = "Holzfäller"; }
    if(SInfo[playerid][pJob] == 10) { Jobname = "Taxifahrer"; }
    GetPlayerName(playerid,pname,sizeof(pname));
    format(sstr1,sizeof(sstr1),"{FF5A00}Berufe von: %s",pname);
    format(sstr2,sizeof(sstr2),"{FEFEFE}Leader %s",Leadername);
    format(sstr3,sizeof(sstr3),"{FEFEFE}Member %s",Membername);
    format(sstr4,sizeof(sstr4),"{FEFEFE}Rang: %d",SInfo[playerid][pRang]);//Fraktionsrang
    format(sstr5,sizeof(sstr5),"{FEFEFE}Nebenjob: %s",Jobname);//Nebenjob
    format(sstrall16,sizeof(sstrall16),"%s\n\n%s\n%s\n%s\n%s",sstr1,sstr2,sstr3,sstr4,sstr5);
    ShowPlayerDialog(playerid,DIALOG_STATS9,DIALOG_STYLE_MSGBOX,"Berufe",sstrall16,"Schließen","");
    }
    if(listitem == 2)
    {
    GetPlayerName(playerid,pname,sizeof(pname));
    format(sstr1,sizeof(sstr1),"{FF5A00}Finanzen von: %s",pname);
    format(sstr2,sizeof(sstr2),"{FEFEFE}Bargeld: %d",GetPlayerMoney(playerid));
    format(sstr3,sizeof(sstr3),"{FEFEFE}Bankkonto: %d",SInfo[playerid][pBankAccount]);
    format(sstr4,sizeof(sstr4),"{FEFEFE}Fraktionsgehalt: %d",SInfo[playerid][pLohn]);//Fraktionsgeld
    format(sstr5,sizeof(sstr5),"{FEFEFE}Verdientes Jobgeld: %d",SInfo[playerid][pJobgeld]);//Jobgeld
    format(sstrall16,sizeof(sstrall16),"%s\n\n%s\n%s\n%s\n%s",sstr1,sstr2,sstr3,sstr4,sstr5);
    ShowPlayerDialog(playerid,DIALOG_STATS8,DIALOG_STYLE_MSGBOX,"Finanzen",sstrall16,"Schließen","");
    }
    if(listitem == 3)
    {
    GetPlayerName(playerid,pname,sizeof(pname));
    format(sstr1,sizeof(sstr1),"{FF5A00}Statistik von: %s",pname);
    format(sstr2,sizeof(sstr2),"{FEFEFE}Morde: %d",SInfo[playerid][pMord]);//Gestorben
    format(sstr3,sizeof(sstr3),"{FEFEFE}Gestorben: %d",SInfo[playerid][pGestorben]);//Gestorben
    format(sstr4,sizeof(sstr4),"{FEFEFE}Mats: %d",SInfo[playerid][pMats]);//Gestorben
    format(sstr5,sizeof(sstr5),"{FEFEFE}Drogen: %d",SInfo[playerid][pDrogen]);//Gestorben
    format(sstr6,sizeof(sstr6),"{FEFEFE}Knast: %d",SInfo[playerid][pKnast]);//Knast
    format(sstr7,sizeof(sstr7),"{FEFEFE}Wanteds: %d",SInfo[playerid][pWantedpunkte]);//Wanteds
    format(sstr8,sizeof(sstr8),"{FEFEFE}Verwarnungen: %d / 3",SInfo[playerid][pWarn]);//Warns
    format(sstrall16,sizeof(sstrall16),"%s\n\n%s\n%s\n%s\n%s\n%s\n%s\n%s",sstr1,sstr2,sstr3,sstr4,sstr5,sstr6,sstr7,sstr8);
    ShowPlayerDialog(playerid,DIALOG_STATS4,DIALOG_STYLE_MSGBOX,"Statistik",sstrall16,"Schließen","");
    }
    if(listitem == 4)
    {
    new text1[20];
    new text2[20];
    new text3[20];
    new text4[20];
    new text5[20];
    new text6[20];

    if(SInfo[playerid][pCarLic]) { text1 = "Ja"; } else { text1 = "Nein"; }
    if(SInfo[playerid][pFlyLic]) { text2 = "Ja"; } else { text2 = "Nein"; }
    if(SInfo[playerid][pBoatLic]) { text3 = "Ja"; } else { text3 = "Nein"; }
    if(SInfo[playerid][pLKWLic]) { text4 = "Ja"; } else { text4 = "Nein"; }
    if(SInfo[playerid][pMotoLic]) { text5 = "Ja"; } else { text5 = "Nein"; }
    if(SInfo[playerid][pWaffenschein]) { text6 = "Ja"; } else { text6 = "Nein"; }
    GetPlayerName(playerid,pname,sizeof(pname));
    format(sstr1,sizeof(sstr1),"{FF5A00}Lizenzen von: %s",pname);
    format(sstr2,sizeof(sstr2),"{FEFEFE}Führerschein: %s",text1);//Gestorben
    format(sstr3,sizeof(sstr3),"{FEFEFE}Motorradschein: %s",text5);//Gestorben
    format(sstr4,sizeof(sstr4),"{FEFEFE}LKWschein: %s",text4);//Gestorben
    format(sstr5,sizeof(sstr5),"{FEFEFE}Flugschein: %s",text2);//Gestorben
    format(sstr6,sizeof(sstr6),"{FEFEFE}Bootschein: %s",text3);//Knast
    format(sstr7,sizeof(sstr7),"{FEFEFE}Waffenschein: %s",text6);//Wanteds
    format(sstrall16,sizeof(sstrall16),"%s\n\n%s\n%s\n%s\n%s\n%s\n%s\n%s",sstr1,sstr2,sstr3,sstr4,sstr5,sstr6,sstr7);
    ShowPlayerDialog(playerid,DIALOG_STATS5,DIALOG_STYLE_MSGBOX,"Statistik",sstrall16,"Schließen","");
    }
    if(listitem == 5)
    {
    new test1[20];
    new test2[20];
    new test3[20];
    if(SInfo[playerid][pHatHaus] > -1)
    {
    test1 = "Ja";
    }
    else
    {
    test1 = "Nein";
    }
    if(SInfo[playerid][pBiz] > -1) { test2 = "Ja"; } else { test2 = "Nein"; }
    if(SInfo[playerid][pBiztanke] > -1) { test3 = "Ja"; } else { test3 = "Nein"; }
    GetPlayerName(playerid,pname,sizeof(pname));
    format(sstr1,sizeof(sstr1),"{FF5A00}Immobilien von: %s",pname);
    format(sstr2,sizeof(sstr2),"{FEFEFE}Haus: %s",test1);//Gestorben
    format(sstr3,sizeof(sstr3),"{FEFEFE}Geschäft: %s",test2);//Gestorben
    format(sstr4,sizeof(sstr4),"{FEFEFE}Tankstelle: %s",test3);//Gestorben
    format(sstrall16,sizeof(sstrall16),"%s\n\n%s\n%s\n%s",sstr1,sstr2,sstr3,sstr4);
    ShowPlayerDialog(playerid,DIALOG_STATS6,DIALOG_STYLE_MSGBOX,"Statistik",sstrall16,"Schließen","");
    }
    }
    }

  • Würde dir auch empfehlen, ne Funktion zu erstellen, um die Rangnamen etc abzufragen. So ist das äußerst nervig. ;)

    ▬|██████|▬
    This is Nudelholz.
    Copy Nudelholz in your Signatur
    to make better Kuchens
    and other Teigprodukte!