Problem mit den Stats..

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
  • Wollte diesen Stat befehl umändern:
    new married[20];
    strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
    new age = PlayerInfo[targetid][pAge];
    new ptime = PlayerInfo[targetid][pConnectTime];
    new lotto = PlayerInfo[targetid][pLottoNr];
    new deaths = PlayerInfo[targetid][pDeaths];
    new fishes = PlayerInfo[targetid][pFishes];
    new bigfish = PlayerInfo[targetid][pBiggestFish];
    new crimes = PlayerInfo[targetid][pCrimes];
    new arrests = PlayerInfo[targetid][pArrested];
    new drugs = PlayerInfo[targetid][pDrugs];
    new mats = PlayerInfo[targetid][pMats];
    new boxdrugs = PlayerInfo[targetid][pBoxDrugs];
    new boxmats = PlayerInfo[targetid][pBoxMats];
    new wanted = WantedLevel[targetid];
    new level = PlayerInfo[targetid][pLevel];
    new exp = PlayerInfo[targetid][pExp];
    new kills = PlayerInfo[targetid][pKills];
    new pnumber = PlayerInfo[targetid][pPnumber];
    new account = PlayerInfo[targetid][pAccount];
    new nxtlevel = PlayerInfo[targetid][pLevel]+1;
    new expamount = nxtlevel*levelexp;
    new costlevel = nxtlevel*levelcost;//10k for testing purposes
    new housekey = PlayerInfo[targetid][pPhousekey];
    new bizkey = PlayerInfo[targetid][pPbiskey];
    new intir = PlayerInfo[targetid][pInt];
    new local = PlayerInfo[targetid][pLocal];
    new Float:shealth = PlayerInfo[targetid][pSHealth];
    new Float:health;
    new name[MAX_PLAYER_NAME];
    GetPlayerName(targetid, name, sizeof(name));
    GetPlayerHealth(targetid,health);
    new Float:px,Float:py,Float:pz;
    new Float:plHealth, Float:plArmour;
    GetPlayerPos(targetid, px, py, pz);
    GetPlayerHealth(targetid,plHealth);
    GetPlayerArmour(targetid,plArmour);
    new string1[200],string2[200],string3[200],string4[200],string5[200],string6[200],string7[200],string8[200],string9[200],string10[200],string11[200],string12[200],string13[200],string14[200],rest[1500];
    format(string1, sizeof string1, "[Stats von %s]", name);
    format(string2, sizeof string2, "[Allgemeines]");
    format(string3, sizeof string3, "Level [%d] Geschlecht [%s] Alter [%d] Herkunft [%s] Spawnenergie [%.1f] Verheiretet mit [%s] Telefonnummer [%d]", level,atext,age,otext,shealth+50.0,married,pnumber);
    format(string4, sizeof string4, "Größter Fisch [%d] Verbrechen [%d] Gefängniszeiten [%d] Kosten für nächstes Level [%d$] Spielminuten seit Login / insgesammt [%d / %d]", bigfish,crimes,arrests,costlevel,PlayerInfo[targetid][pMinutesSinceLogin],PlayerInfo[targetid][pGesamtMinutes]);
    format(string5, sizeof string5, "Kreditraten verbleibend / Summe [%d / %d] Spielminuten bis Payday [%d]", PlayerInfo[targetid][pPlayerKreditDauer], PlayerInfo[targetid][pPlayerKredit], 60-PlayerInfo[targetid][pPlayMinutes]);
    format(string6, sizeof string6, "[Besitztum]");
    format(string7, sizeof string7, "Premium Rang [%s] Spielzeit [%d] Lottonummer [%d] Wantedlevel [%d] Krankheit [%s] Gefangene Fische [%d] Kills & Deaths [%d / %d]", drank,ptime,lotto,wanted,dtext,fishes,kills,deaths);
    format(string8, sizeof string8, "Bargeld [%d$] Bankkonto [%d$] Drogen [%d] Materialien [%d] Box Materialien [%d] Box Drogen [%d] Respektpunkte [%d / %d]", cash,account,drugs,mats,boxmats,boxdrugs,exp,expamount);
    format(string9, sizeof string9, "[Fraktion und Job]");
    format(string10, sizeof string10, "Team [%s] Organisation [%s] Rang [%s] Familie [%s] Job [%s] Gehalt/Payday: [%d$] Fraktionsmaterialien: [%d]", ttext,ftext,rtext,f2text,jtext,PlayerInfo[targetid][pGehalt], FrakMatsHolding[targetid]);
    format(string11, sizeof string11, "[Zusatzinfos]");
    format(string12, sizeof string12, "Hausschlüssel [%d] Geschäftsschlüssel [%d] Interior [%d] Gebäude [%d]", housekey,bizkey,intir,local);
    format(string13, sizeof string13, "Zeit bis zum nächsten Flug [%d] (Job Pilot) Zeit bis zur nächsten Fahrt [%d] (Job Müllmann)", PlayerInfo[targetid][pFlugTime]/60, PlayerInfo[targetid][pMulltime]/60);
    format(string14, sizeof string14, "Lebenspunkte [%.2f] Schutzweste [%.2f] Ping [%d] Verwarnungen [%d]", plHealth,plArmour,GetPlayerPing(targetid),PlayerInfo[targetid][pWarns]);
    format(rest, sizeof rest, "%s\n\n\n%s\n%s\n%s\n%s\n\n%s\n%s\n%s\n\n%s\n%s\n\n%s\n%s\n%s\n%s", string1,string2,string3,string4,string5,string6,string7,string8,string9,string10,string11,string12,string13,string14);
    ShowPlayerDialog(playerid,30,DIALOG_STYLE_MSGBOX,"Statstik",rest,"Beenden","");
    }
    }


    Zu diesem:
    new married[20];
    strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
    new age = PlayerInfo[targetid][pAge];
    new crimes = PlayerInfo[targetid][pCrimes];
    new arrests = PlayerInfo[targetid][pArrested];
    new boxdrugs = PlayerInfo[targetid][pBoxDrugs];
    new boxmats = PlayerInfo[targetid][pBoxMats];
    new wanted = WantedLevel[targetid];
    new level = PlayerInfo[targetid][pLevel];
    new exp = PlayerInfo[targetid][pExp];
    new pnumber = PlayerInfo[targetid][pPnumber];
    new account = PlayerInfo[targetid][pAccount];
    new nxtlevel = PlayerInfo[targetid][pLevel]+1;
    new expamount = nxtlevel*levelexp;
    new costlevel = nxtlevel*levelcost;//10k for testing purposes
    new Float:health;
    new name[MAX_PLAYER_NAME];
    GetPlayerName(targetid, name, sizeof(name));
    GetPlayerHealth(targetid,health);
    new Float:px,Float:py,Float:pz;
    new Float:plHealth, Float:plArmour;
    GetPlayerPos(targetid, px, py, pz);
    GetPlayerHealth(targetid,plHealth);
    GetPlayerArmour(targetid,plArmour);
    new string1[200],string2[200],string3[200],string4[200],string5[200],string6[200],string7[200],string8[200],string9[200],string10[200],string11[200],string12[200],string13[200],string14[200],string15[200],string16[200],string17[200],string18[200],string19[200],string20[200];
    new string21[200],string22[200],string23[200],string24[200],string25[200],string26[200],string27[200],string28[200],string29[200],string30[200],string31[200],string32[200],string33[200],string34[200],string35[200],rest[1500];
    format(string1, sizeof string1, "{FF0000}%s{FFFFFF}", name);
    format(string2, sizeof string2, "{FF9900}Allgemeines{FFFFFF}");
    format(string3, sizeof string3, "----------------------------");
    format(string4, sizeof string4, "Level: %d", level);
    format(string5, sizeof string5, "Geschlecht: %s", atext);
    format(string6, sizeof string6, "Alter: %d", age);
    format(string7, sizeof string7, "Herkunft: %s", otext);
    format(string8, sizeof string8, "Verheiratet mit %s", married);
    format(string9, sizeof string9, "Telefonnummer: %d", pnumber);
    format(string10, sizeof string10, "{FF9900}Sonstiges / Verbrechen{FFFFFF}");
    format(string11, sizeof string11, "----------------------------");
    format(string12, sizeof string12, "Verbrechen: %d ", crimes);
    format(string13, sizeof string13, "Gefängniszeiten: %d", arrests);
    format(string14, sizeof string14, "Kosten für nächstes Level: %d$ ", costlevel);
    format(string15, sizeof string15, "Spielminuten seit Login / insgesammt: %d / %d", PlayerInfo[targetid][pMinutesSinceLogin],PlayerInfo[targetid][pGesamtMinutes]);
    format(string16, sizeof string16, "{FF9900}Vermögen{FFFFFF}");
    format(string17, sizeof string17, "----------------------------");
    format(string18, sizeof string18, "Bargeld: %d$ ", cash);
    format(string19, sizeof string19, "Bankkonto: %d$ ", account);
    format(string20, sizeof string20, "Premium Rang: %s ", drank);
    format(string21, sizeof string21, "Wantedlevel: %d ", wanted);
    format(string22, sizeof string22, "Respektpunkte: %d / %d ", exp,expamount);
    format(string23, sizeof string23, "{FF9900}Savebox{FFFFFF}");
    format(string24, sizeof string24, "----------------------------");
    format(string25, sizeof string25, "Materialen: %d ", boxmats);
    format(string26, sizeof string26, "Drogen: %d ", boxdrugs);
    format(string27, sizeof string27, "{FF9900}Fraktion und Beruf{FFFFFF}");
    format(string28, sizeof string28, "----------------------------");
    format(string29, sizeof string29, "Team: %s ", ttext);
    format(string30, sizeof string30, "Organisation: %s ", ftext);
    format(string31, sizeof string31, "Rang: %s ", rtext);
    format(string32, sizeof string32, "Familie: %s ", f2text);
    format(string33, sizeof string33, "Beruf: %s ", jtext);
    format(string34, sizeof string34, "Gehalt/Payday: %s ", PlayerInfo[targetid][pGehalt]);
    format(rest, sizeof rest, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s", string1,string2,string3,string4,string5,string6,string7,string8,string9,string10,string11,string12,string13,string14,string14,string15,string16,string17,string18,string19,string20,string21,string22,string23,string24,string25,string26,string27,string28,string29,string30,string31,string32,string33,string34,string35);
    ShowPlayerDialog(playerid,30,DIALOG_STYLE_MSGBOX,"Statstik",rest,"Beenden","");
    }
    return 1;
    }


    Funktioniert aber nicht ?! dann kommt Unknown Command oder so..

  • Vergleich mal die geschweiften Klammern ^^ dann weißt du wo der Fehler liegt ;)