stats gehen nicht(dialog)

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
  • joar hier was ist falsch?
    new coordsstring[256];
    new coordsstring1[256];
    new coordsstring2[256];
    new coordsstring3[256];
    new coordsstring4[256];
    new coordsstring5[256];
    new coordsstring6[256];
    new coordsstring7[1536];
    format(coordsstring, sizeof(coordsstring),"***Spieler Stats von %s ***",name);
    format(coordsstring, sizeof(coordsstring1), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] SpawnHealth:[%.1f] Cash:[$%d] Bank:[$%d] Ph:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
    format(coordsstring, sizeof(coordsstring2), "DonateRank:[%s] MarriedTo:[%s] PlayingHours:[%d] LottoNr:[%d] Job:[%s]", drank,married,ptime,lotto,jtext);
    format(coordsstring, sizeof(coordsstring3), "FishesCaught:[%d] BiggestFish:[%d] CrimesCommited:[%d] TimesArrested:[%d] WantedDeaths:[%d]", fishes,bigfish,crimes,arrests,warrests );
    format(coordsstring, sizeof(coordsstring4), "Kills:[%d] Deaths:[%d] NextLevel:[$%d] Respect:[%d/%d] WantedLevel:[%d] Family:[%s]",kills,deaths,costlevel,exp,expamount,wanted,f2text);
    format(coordsstring, sizeof(coordsstring5), "Drugs:[%d] Materials:[%d] Team:[%s] Disease:[%s] Organisation:[%s] Rank:[%s]",drugs,mats,ttext,dtext,ftext,rtext);
    format(coordsstring, sizeof(coordsstring7), "%s\n%s\n%s\n%s\n%s\n%s",coordsstring1,coordsstring2,coordsstring3,coordsstring4,coordsstring5,coordsstring6);
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    format(coordsstring, sizeof(coordsstring6), "House key [%d] Business key [%d] HireKey [%d] int:[%d] local[%d]", housekey,bizkey,HireCar[targetid],intir,local);
    }
    ShowPlayerDialog(playerid, DIALOG_STATS, 0, coordsstring, coordsstring7, "weiter", "weiter");

    Einmal editiert, zuletzt von Jumbotimo ()

  • coordsstring, sizeof(coordsstring1
    coordsstring, sizeof(coordsstring2
    coordsstring, sizeof(coordsstring3
    coordsstring, sizeof(coordsstring4
    coordsstring, sizeof(coordsstring5
    coordsstring, sizeof(coordsstring6
    coordsstring, sizeof(coordsstring7


    Fällt dir was auf?


    So isses richtig:


    coordsstring1, sizeof(coordsstring1
    coordsstring2, sizeof(coordsstring2
    coordsstring3, sizeof(coordsstring3
    coordsstring4, sizeof(coordsstring4
    coordsstring5, sizeof(coordsstring5
    coordsstring6, sizeof(coordsstring6
    coordsstring7, sizeof(coordsstring7


    MFG, Robdeflop®

  • jetzt geht der befehl nicht mehr:) :?: :?:
    if (strcmp(cmd, "/stats", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (gPlayerLogged[playerid] != 0)
    {
    ShowStats(playerid,playerid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht eingelogt !");
    }
    }
    return 1;
    }

  • oben #define STATS 0

    new coordsstring[256];
    new coordsstring1[256];
    new coordsstring2[256];
    new coordsstring3[256];
    new coordsstring4[256];
    new coordsstring5[256];
    new coordsstring6[256];
    new coordsstring7[256];
    new coordsstring8[256];
    format(coordsstring, sizeof(coordsstring),"***Spieler Stats von %s ***",name);
    format(coordsstring1, sizeof(coordsstring1), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] SpawnHealth:[%.1f] Cash:[$%d] Bank:[$%d] Ph:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
    format(coordsstring2, sizeof(coordsstring2), "DonateRank:[%s] MarriedTo:[%s] PlayingHours:[%d] LottoNr:[%d] Job:[%s]", drank,married,ptime,lotto,jtext);
    format(coordsstring3, sizeof(coordsstring3), "FishesCaught:[%d] BiggestFish:[%d] CrimesCommited:[%d] TimesArrested:[%d] WantedDeaths:[%d]", fishes,bigfish,crimes,arrests,warrests );
    format(coordsstring4, sizeof(coordsstring4), "Kills:[%d] Deaths:[%d] NextLevel:[$%d] Respect:[%d/%d] WantedLevel:[%d] Family:[%s]",kills,deaths,costlevel,exp,expamount,wanted,f2text);
    format(coordsstring5, sizeof(coordsstring5), "Drugs:[%d] Materials:[%d] Team:[%s] Disease:[%s] Organisation:[%s] Rank:[%s]",drugs,mats,ttext,dtext,ftext,rtext);
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    format(coordsstring6, sizeof(coordsstring6), "House key [%d] Business key [%d] HireKey [%d] int:[%d] local[%d]", housekey,bizkey,HireCar[targetid],intir,local);
    }
    strcat(coordsstring8, coordsstring, sizeof(coordsstring8));
    strcat(coordsstring8, coordsstring1, sizeof(coordsstring8));
    strcat(coordsstring8, coordsstring2, sizeof(coordsstring8));
    strcat(coordsstring8, coordsstring3, sizeof(coordsstring8));
    strcat(coordsstring8, coordsstring4, sizeof(coordsstring8));
    strcat(coordsstring8, coordsstring6, sizeof(coordsstring8));
    strcat(coordsstring8, coordsstring5, sizeof(coordsstring8));
    strcat(coordsstring8, coordsstring7, sizeof(coordsstring8));
    ShowPlayerDialog(playerid,STATS, DIALOG_STYLE_MSGBOX, coordsstring8, coordsstring8, "OK", "OK");
    bin mir nicht sicher müsste aber gehn

    "Bevor ich mir Informationen aus der "Bild" hole,
    werde ich anfangen, Wahlergebnisse danach vorauszusagen,
    neben welchen Busch unsere Katze gepinkelt hat."

    Margarete Stokowski

  • der befehl geht nicht mehr
    wieso geht der befehl nicht mehr?
    da steht immer
    SERVER:Unkown Command
    HAT JEMAND NE IDEE?

    2 Mal editiert, zuletzt von Jumbotimo ()

  • das geht wie kann ich aber das jeder string in der nächsten zeile ist?

  • benutze doch den stat von Funner also FS der ist net so schlecht ^^


    da steht in der leiste Name: Level: Geld: Tode: Kills: aber im pwn datei ist ein kleiner "fehler" so kann man es net nennen aber wenn du es hast erklär ichs dir ;)

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Versuch damit:
    new _string_table[3][64];
    new fullstr[128];
    format(_string_table[0],64,"Liste Nummer eins mit zahl %d & format %s",2,"Hallo");
    format(_string_table[1],64,"bla mit %d mit Senf blubb",5);
    format(_string_table[2],64,"You can say %s","Hello World");
    format(fullstr,sizeof fullstr,"%s\n%s\n%s",_string_table[0],_string_table[1],_string_table[2]);
    ShowPlayerDialog(playerid,statemsg,0,"Test",fullstr,"ok","Schließen");

  • jetzt habe ich es aber irgendwie muss ich wissen wie ich die strings definieren muss damit alles angezeigt wird
    new coordsstring1[100];
    new coordsstring2[980];
    new coordsstring3[980];
    new coordsstring4[980];
    new coordsstring5[980];
    new coordsstring6[980];
    new coordsstring7[980];
    new coordsstring8[980];
    new coordsstring9[980];
    //SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
    format(coordsstring1, sizeof(coordsstring1),"*** %s ***",name);
    //SendClientMessage(playerid, COLOR_WHITE,coordsstring);
    format(coordsstring2, sizeof(coordsstring2), "Level:[%d] Geschlecht:[%s] Alter:[%d] Herkunft:[%s] Spawnenergie:[%.1f] Geld:[$%d] Bank:[$%d] Ph:[%d]\n", level,atext,age,otext,shealth+50, cash, account, pnumber);
    //SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
    format(coordsstring3, sizeof(coordsstring3), "Premium Rang:[%s] Verheiratet:[%s] Spielzeit:[%d] LottoNr:[%d] Job:[%s]\n", drank,married,ptime,lotto,jtext);
    //SendClientMessage(playerid, COLOR_GRAD3,coordsstring);
    format(coordsstring4, sizeof(coordsstring4), "FishesCaught:[%d] GrösterFisch:[%d] Verbrechen:[%d] Gefängniszeit:[%d] Gesucht:[%d]\n", fishes,bigfish,crimes,arrests,warrests );
    //SendClientMessage(playerid, COLOR_GRAD4,coordsstring);
    format(coordsstring5, sizeof(coordsstring5), "Kills:[%d] Tode:[%d] Nächstes Level:[$%d] Respekt:[%d/%d] WantedLevel:[%d] Familie:[%s]\n",kills,deaths,costlevel,exp,expamount,wanted,f2text);
    //SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    format(coordsstring6, sizeof(coordsstring6), "Drugs:[%d] Materials:[%d] Team:[%s] Krankheit:[%s] Organisation:[%s] Rank:[%s]\n",drugs,mats,ttext,dtext,ftext,rtext);
    //SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    format(coordsstring7, sizeof(coordsstring7), "Spielminuten seit Login: [%d] Spielminuten bis zum PayDay: [%d] Spielminuten Insgesamt: [%d]\n",PlayerInfo[targetid][pMinutesSinceLogin],(60-PlayerInfo[targetid][pPlayMinutes]),PlayerInfo[targetid][pGesamtMinutes]);
    //SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    strcat(coordsstring9, coordsstring2, sizeof(coordsstring2));
    strcat(coordsstring9, coordsstring3, sizeof(coordsstring3));
    strcat(coordsstring9, coordsstring4, sizeof(coordsstring4));
    strcat(coordsstring9, coordsstring5, sizeof(coordsstring5));
    strcat(coordsstring9, coordsstring6, sizeof(coordsstring6));
    strcat(coordsstring9, coordsstring7, sizeof(coordsstring7));
    strcat(coordsstring9, coordsstring8, sizeof(coordsstring8));also welche zahl brauchen die einzelne strings?

    Einmal editiert, zuletzt von Jumbotimo ()


  • public ShowStats(playerid,targetid)
    {
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
    new coordsstring1[256];
    new coordsstring2[256];
    new coordsstring3[256];
    new coordsstring4[256];
    new coordsstring5[256];
    new coordsstring6[256];
    new coordsstring7[256];
    new coordsstring8[256];
    new coordsstring9[1024];
    //SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
    format(coordsstring1, sizeof(coordsstring1),"*** %s ***",name);
    //SendClientMessage(playerid, COLOR_WHITE,coordsstring);
    format(coordsstring2, sizeof(coordsstring2), "Level:[%d] Geschlecht:[%s] Alter:[%d] Herkunft:[%s] Spawnenergie:[%.1f] Geld:[$%d] Bank:[$%d] Ph:[%d]\n", level,atext,age,otext,shealth+50, cash, account, pnumber);
    //SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
    format(coordsstring3, sizeof(coordsstring3), "Premium Rang:[%s] Verheiratet:[%s] Spielzeit:[%d] LottoNr:[%d] Job:[%s]\n", drank,married,ptime,lotto,jtext);
    //SendClientMessage(playerid, COLOR_GRAD3,coordsstring);
    format(coordsstring4, sizeof(coordsstring4), "FishesCaught:[%d] GrösterFisch:[%d] Verbrechen:[%d] Gefängniszeit:[%d] Gesucht:[%d]\n", fishes,bigfish,crimes,arrests,warrests );
    //SendClientMessage(playerid, COLOR_GRAD4,coordsstring);
    format(coordsstring5, sizeof(coordsstring5), "Kills:[%d] Tode:[%d] Nächstes Level:[$%d] Respekt:[%d/%d] WantedLevel:[%d] Familie:[%s]\n",kills,deaths,costlevel,exp,expamount,wanted,f2text);
    //SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    format(coordsstring6, sizeof(coordsstring6), "Drugs:[%d] Materials:[%d] Team:[%s] Krankheit:[%s] Organisation:[%s] Rank:[%s]\n",drugs,mats,ttext,dtext,ftext,rtext);
    //SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    format(coordsstring7, sizeof(coordsstring7), "Spielminuten seit Login: [%d] Spielminuten bis zum PayDay: [%d] Spielminuten Insgesamt: [%d]\n",PlayerInfo[targetid][pMinutesSinceLogin],(60-PlayerInfo[targetid][pPlayMinutes]),PlayerInfo[targetid][pGesamtMinutes]);
    //SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    strcat(coordsstring9, coordsstring2, sizeof(coordsstring9));
    strcat(coordsstring9, coordsstring3, sizeof(coordsstring9));
    strcat(coordsstring9, coordsstring4, sizeof(coordsstring9));
    strcat(coordsstring9, coordsstring5, sizeof(coordsstring9));
    strcat(coordsstring9, coordsstring6, sizeof(coordsstring9));
    strcat(coordsstring9, coordsstring7, sizeof(coordsstring9));
    strcat(coordsstring9, coordsstring8, sizeof(coordsstring9));
    ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"Stats",coordsstring9,"Ok",Ok");
    }
    }

    "Bevor ich mir Informationen aus der "Bild" hole,
    werde ich anfangen, Wahlergebnisse danach vorauszusagen,
    neben welchen Busch unsere Katze gepinkelt hat."

    Margarete Stokowski

    Einmal editiert, zuletzt von Akino Kiritani ()

  • der string muss dann aber sehr sehr groß sein. Ich bevorzuge meine Variante^^ Muss jeder selbst entscheiden

    "Bevor ich mir Informationen aus der "Bild" hole,
    werde ich anfangen, Wahlergebnisse danach vorauszusagen,
    neben welchen Busch unsere Katze gepinkelt hat."

    Margarete Stokowski

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