/stats mit einer Dialog Box

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 hab mal den befehl /stats in einer dialog box gemacht... habe selfmade, also das sieht so aus


    #define DIALOG_STATS 189


    und hier stock ShowPlayerStatsDialog(playerid) // Ich nenne das stock einfach mal so
    {//5526
    return ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Statistik","Name: %s\nLevel: [%d] Kills: [%d] Tode: [%d] Geld: [$%d] Bank: [$%d] Knastbesuche: [%d] Telefon: [%d]\nWanteds: [%d] Spielzeit: [%d] Spielminuten: [%d] Respekt: [%d/%d] Levelkosten: [$%d]\nFraktion: [%s] Rank: [%s] Organisation: [%s] Punkte: [%d]\nAdminLevel: [%d] AdminName: %s","OK","Abbrechen"ReadName(targetid),level, kills,deaths,cash,bank, knast, nur,wntds,std,mini,now,now2,price,fraktion,rank,organi,pnts,aLevel, ReadName(targetid));//5527
    }//5528


    so, keine errors nicht... noch wen ich den befehl machen will, kommt das


    C:\Users\Mario\Desktop\fortcarson.pwn(5526) : error 075: input line too long (after substitutions)
    C:\Users\Mario\Desktop\fortcarson.pwn(5527) : error 001: expected token: "-string end-", but found "-identifier-"
    C:\Users\Mario\Desktop\fortcarson.pwn(5527) : error 017: undefined symbol "targetid"
    C:\Users\Mario\Desktop\fortcarson.pwn(5528) : error 017: undefined symbol "argetid"
    C:\Users\Mario\Desktop\fortcarson.pwn(5528) : error 029: invalid expression, assumed zero
    C:\Users\Mario\Desktop\fortcarson.pwn(5528) : error 029: invalid expression, assumed zero
    C:\Users\Mario\Desktop\fortcarson.pwn(5528) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    7 Errors.
    hier der command


    if (strcmp("/statsi", cmdtext, true, 10) == 0)
    {
    ShowPlayerStatsDialog(playerid); // Hier muss der Name des "stock" eingesetzt werden, damit das GUI geöffnet werden kann!
    return 1;
    }


    hoffe auf schnelle hilfe ;)//edit, ich brauche jetzt schnelle hilfe .D

    2 Mal editiert, zuletzt von [GGR]SoNiC ()

  • if (strcmp("/statsi", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Statistik","Name: %s\nLevel: [%d] Kills: [%d] Tode: [%d] Geld: [$%d] Bank: [$%d] Knastbesuche: [%d] Telefon: [%d]\nWanteds: [%d] Spielzeit: [%d] Spielminuten: [%d] Respekt: [%d/%d] Levelkosten: [$%d]\nFraktion: [%s] Rank: [%s] Organisation: [%s] Punkte: [%d]\nAdminLevel: [%d] AdminName: %s","OK","Abbrechen"ReadName(targetid),level, kills,deaths,cash,bank, knast, nur,wntds,std,mini,now,now2,price,fraktion,rank,organi,pnts,aLevel, ReadName(targetid));//5527
    return 1;
    }


    versuch des mal so

  • Probiers mal so



    new string[1024];
    format(string,sizeof(string),"Name: %s\nLevel: [%d] Kills: [%d] Tode: [%d] Geld: [$%d] Bank: [$%d] Knastbesuche: [%d] Telefon: [%d]\nWanteds: [%d] Spielzeit: [%d] Spielminuten: [%d] Respekt: [%d/%d] Levelkosten: [$%d]\nFraktion: [%s] Rank: [%s] Organisation: [%s] Punkte: [%d]\nAdminLevel: [%d] AdminName: %s",ReadName(targetid),level, kills,deaths,cash,bank, knast, nur,wntds,std,mini,now,now2,price,fraktion,rank,organi,pnts,aLevel, ReadName(targetid);



    ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,string,"OK","Abbrechen");//5527

  • soll ich das in den command machen ?



    achja, vllt hats ja was damit zutuhn ob ich es i-wie fallsch gemacht hab


    hier ma das showstats public
    public ShowStats(playerid,targetid)
    {
    if(IsPlayerConnected(playerid) && IsPlayerConnected(targetid))
    {
    new knast = PlayerInfo[targetid][pKnast];
    new cash = GetPlayerMoney(targetid);
    new deaths = PlayerInfo[targetid][pDeaths];
    new kills = PlayerInfo[targetid][pKills];
    new bank = PlayerInfo[targetid][pBank];
    new admin = PlayerInfo[targetid][pAdmin];
    new level = GetPlayerLevel(targetid);
    new aLevel;
    if(admin >= 1) { aLevel = admin; }
    //--------------------------------------------------------------------//
    new fraktion[256]; new frakid = PlayerInfo[targetid][pTeam];
    new organi[256], rank[256], rankid = PlayerInfo[targetid][pRank];
    //--------------------------------------------------------------------//
    if(frakid == 1) { fraktion = "Zivilist"; }
    else if(frakid == 2) { fraktion = "Polizist"; organi = "Los Santos Polizei"; }
    else if(frakid == 3) { fraktion = "FBI Agent"; organi = "Fuderal Bureau of Investigation"; }
    else if(frakid == 4) { fraktion = "Sanitäter"; organi = "Los Santos Krankenhaus"; }
    else if(frakid == 5) { fraktion = "Fahrlehrer"; organi = "Fahrschule San Fierro"; }
    else if(frakid == 6) { fraktion = "Hitman"; organi = "Hitman Agency"; }
    else if(frakid == 7) { fraktion = "Al Qaida"; organi = "Al Qaida"; }
    else { organi = "-"; rank = "-"; if(frakid == 1) { fraktion = "Zivilist"; } else { fraktion = "-"; PlayerInfo[playerid][pTeam] = 1; } }
    //--------------------------------------------------------------------//
    if(frakid == 1) {
    if(rankid == 0) { rank = "-"; organi = "-"; }
    else if(rankid == 1) { rank = "-"; organi = "-"; }
    else if(rankid == 2) { rank = "-"; organi = "-"; }
    else if(rankid == 3) { rank = "-"; organi = "-"; }
    else if(rankid == 4) { rank = "-"; organi = "-"; }
    else if(rankid == 5) { rank = "-"; organi = "-"; }
    else if(rankid == 6) { rank = "-"; organi = "-"; }
    }
    else if(frakid == 2) {
    if(rankid == 1) { rank = "Praktikant"; }
    else if(rankid == 2) { rank = "Coporal"; }
    else if(rankid == 3) { rank = "Sergeant"; }
    else if(rankid == 4) { rank = "Major"; }
    else if(rankid == 5) { rank = "Lieutant"; }
    else if(rankid == 6) { rank = "General"; }
    else { rank = "-"; }
    }
    else if(frakid == 3) {
    if(rankid == 1) { rank = "Praktikant"; }
    else if(rankid == 2) { rank = "Agent"; }
    else if(rankid == 3) { rank = "Special Agent"; }
    else if(rankid == 4) { rank = "Professional Agent"; }
    else if(rankid == 5) { rank = "Co-General"; }
    else if(rankid == 6) { rank = "General"; }
    else { rank = "-"; }
    }
    else if(frakid == 4) {
    if(rankid == 1) { rank = "Praktikant"; }
    else if(rankid == 2) { rank = "Helfer"; }
    else if(rankid == 3) { rank = "Notfall Helfer"; }
    else if(rankid == 4) { rank = "Notfall Arzt"; }
    else if(rankid == 5) { rank = "Rettungssanitäter"; }
    else if(rankid == 6) { rank = "General"; }
    else { rank = "-"; }
    }
    else if(frakid == 5) {
    if(rankid == 1) { rank = "Praktikant"; }
    else if(rankid == 2) { rank = "Ausbilder"; }
    else if(rankid == 3) { rank = "Fahrlehrer"; }
    else if(rankid == 4) { rank = "Fluglehrer"; }
    else if(rankid == 5) { rank = "Waffenlehrer"; }
    else if(rankid == 6) { rank = "General"; }
    else { rank = "-"; }
    }
    else if(frakid == 6) {
    if(rankid == 1) { rank = "Praktikant"; }
    else if(rankid == 2) { rank = "Anfänger Killer"; }
    else if(rankid == 3) { rank = "Forgeschrittener Killer"; }
    else if(rankid == 4) { rank = "Professionaler Killer"; }
    else if(rankid == 5) { rank = "Killer"; }
    else if(rankid == 6) { rank = "General"; }
    else { rank = "-"; }
    }
    else if(frakid == 7) {
    if(rankid == 1) { rank = "Terror Azubi"; }
    else if(rankid == 2) { rank = "Terrorist"; }
    else if(rankid == 3) { rank = "Bombenleger"; }
    else if(rankid == 4) { rank = "Rechte Hand"; }
    else if(rankid == 5) { rank = "Co Boss"; }
    else if(rankid == 6) { rank = "Boss"; }
    else { rank = "-"; }
    }
    else { rank = "-"; organi = "-"; if(frakid == 1) { fraktion = "Zivilist"; } else { fraktion = "-"; PlayerInfo[playerid][pTeam] = 1; } }
    new wntds = PlayerInfo[targetid][pWanteds];
    new pnts = PlayerInfo[targetid][pJPoints];
    new std = PlayerInfo[targetid][pExp];
    new mini = (PlayerInfo[targetid][pPoint]);
    new now = PlayerInfo[targetid][pRespekt];
    new now2 = (level*4);
    new price = (level*25000);
    new nur = PlayerInfo[targetid][pNummer];
    //--------------------------------------------------------------------//
    new coordsstring[256];
    SendClientMessage(playerid, COLOR_GREEN,"==========================================================");
    format(coordsstring, sizeof(coordsstring), "*:: Name ::* %s *::*", ReadName(targetid));
    SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    format(coordsstring, sizeof(coordsstring), "Level: [%d] Kills: [%d] Tode: [%d] Geld: [$%d] Bank: [$%d] Knastbesuche: [%d] Telefon: [%d]",level, kills,deaths,cash,bank, knast, nur);
    SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    format(coordsstring, sizeof(coordsstring), "Wanteds: [%d] Spielzeit: [%d] Spielminuten: [%d] Respekt: [%d/%d] Levelkosten: [$%d]",wntds,std,mini,now,now2,price);
    SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    format(coordsstring, sizeof(coordsstring), "Fraktion: [%s] Rank: [%s] Organisation: [%s] Punkte: [%d]",fraktion,rank,organi,pnts);
    SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
    format(coordsstring, sizeof(coordsstring), "AdminLevel: [%d] AdminName: %s",aLevel, ReadName(targetid));
    if(aLevel > 0) { SendClientMessage(playerid, COLOR_GRAD5,coordsstring); }
    SendClientMessage(playerid, COLOR_GREEN,"==========================================================");
    }
    }

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • das geht alles ned, oben is ein beitrag von mir, könnt ihr mir eins machen ?