Guten Abend,
ich brauche pls hilfe ich möchte das gerne so haben wenn ich /stats eingebe das ich die stats in ein Dialog Fenster befindet.
Könnte mir da einer helfen ich benutze ein gf-edit
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
-
-
-
Aber das ist mehr für Selfmade und ich benutze ein GF-Edit kann da mir einer helfen ?
-
Aber das ist mehr für Selfmade und ich benutze ein GF-Edit kann da mir einer helfen ?
Kenne mich in GF zwar uberhaupt net aus da ich damit nie gearbeitet habe aber da gibts fur stats sicher auch Variablen du musst sie nur reinsetzen
-
Also ich habe irgend wie 5 variabeln drine kapiere ich irgend wie nicht wie das gehen soll.
-
Gib mir mal die Variablen die es in /stats fur GF gibt ...
-
Jüngchen?
Was ist denn daran so schwer, die 5 Stats Zeilen in eine MSG Box zu packen?Du musst nur den Inhalt der SendClientMessage's in eine einzige MSG Box tun.
-
Wisst ihr, wie mich das aufregt, wenn ich jedes mal, wenn ich on bin, sehe: Stats über Dialog..
Mensch, ist das denn so schwer einfach mal die Suche oben rechts zu verwenden?
Ich wette da findest du was..
Oder lass mich mal raten: Du hast einfach keine Lust das alles durchzulesen..
Gruß Hauke
-
Dave krieg ich jz die Variablen oder nicht ? Muss schlafen >.> Jz sag nicht ,dass du nicht weisst was ne Variable ist
-
Gieb mal den STats cmd.
-
-
if (strcmp(cmd, "/stats", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
ShowStats(playerid,playerid);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist nicht eingeloggt !");
}
}
return 1;
}und hier
public ShowStats(playerid,targetid)
{
if(TOGGLE_DEBUG_MODE)
{
printf(" //DEBUG: CALL ShowStats(%i, %i)", playerid, targetid);
}
if(IsPlayerConnected(playerid) && IsPlayerConnected(targetid))
{
new cash = GetPlayerMoney(targetid);
new atext[20];
if(PlayerInfo[targetid][pSex] == 1) { atext = "Männlich"; }
else if(PlayerInfo[targetid][pSex] == 2) { atext = "Weiblich"; }
new otext[20];
if(PlayerInfo[targetid][pOrigin] == 1) { otext = "Deutschland"; }
else if(PlayerInfo[targetid][pOrigin] == 2) { otext = "Osterreich"; }
else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Schweiz"; }
new ttext[20];
if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Zivilist"; }
else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "LSPD"; }
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "Bundeswehr"; }
else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Firemen/Paramedic"; }
else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "LCN"; }
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Yakuza"; }
else if(PlayerInfo[targetid][pMember] == 7 || PlayerInfo[targetid][pLeader] == 7) { ttext = "Mayor"; }
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen"; }
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "News Reporter"; }
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxi"; }
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "School Instructor"; }
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12) { ttext = "Ordnungsamt"; }
else if(PlayerInfo[targetid][pMember] == 13 || PlayerInfo[targetid][pLeader] == 13) { ttext = "Midnight Club"; }
else if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 14) { ttext = "Truck Company"; }
else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15) { ttext = "Russische Mafia"; }
else if(PlayerInfo[targetid][pMember] == 16 || PlayerInfo[targetid][pLeader] == 16) { ttext = "Post Office"; }
else if(PlayerInfo[targetid][pMember] == 17 || PlayerInfo[targetid][pLeader] == 17) { ttext = "SF Police Force"; }
new dtext[20];
if(STDPlayer[targetid] == 1) { dtext = "Chlamydia"; }
else if(STDPlayer[targetid] == 2) { dtext = "Gonorrhea"; }
else if(STDPlayer[targetid] == 3) { dtext = "Syphilis"; }
else { dtext = "none"; }
new ftext[20];
if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)
{ ftext = "LSPD"; }
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)
{ ftext = "FBI"; }
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)
{ ftext = "Bundeswehr"; }
else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
{ ftext = "Firemen/Paramedics"; }
else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
{ ftext = "La Cosa Nostra"; }
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
{ ftext = "Yakuza"; }
else if(PlayerInfo[targetid][pMember] == 7 || PlayerInfo[targetid][pLeader] == 7)
{ ftext = "Mayor Office"; }
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12)
{ ftext = "Ordnungsamt Service"; }
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11)
{ ftext = "Fahrlehrer"; }
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12)
{ ftext = "Ordnungsamt Service"; }
else if(PlayerInfo[targetid][pMember] == 13 || PlayerInfo[targetid][pLeader] == 13)
{ ftext = "Midnight Club"; }
else if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 14)
{ ftext = "SA Truck Company"; }
else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15)
{ ftext = "Russische Mafia"; }
else if(PlayerInfo[targetid][pMember] == 16 || PlayerInfo[targetid][pLeader] == 16)
{ ftext = "Post Service"; }
else if(PlayerInfo[targetid][pMember] == 17 || PlayerInfo[targetid][pLeader] == 17)
{ ftext = "SFPD"; }
else
{ ftext = "none"; }
new f2text[20];
if(PlayerInfo[targetid][pFMember] < 255) { f2text = FamilyInfo[PlayerInfo[targetid][pFMember]][FamilyName]; }
else { f2text = "none"; }
new rtext[64];
if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5
|| PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6
|| PlayerInfo[targetid][pMember] == 13 || PlayerInfo[targetid][pLeader] == 13
|| PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15
|| PlayerInfo[targetid][pFMember] < 255)//The 2 Organisations
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Outsider"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Associate"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Soldier"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Capo"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Godfather"; }
else { rtext = "Outsider"; }
} -
da Wird kein einziges mal SendClientMessage verwendet.
-
Genau wie kann es bitte /stats anzeigen??
-
Hier teil 2
}
else
{
rtext = "none";
}
new jtext[20];
if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detective"; }
else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Lawyer"; }
else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Whore"; }
else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Drug Dealer"; }
else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Car Jacker"; }
else if(PlayerInfo[targetid][pJob] == 6) { jtext = "News Reporter"; }
else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Mechanic"; }
else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Weapon Dealer"; }
else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Car Dealer"; }
else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Boxer"; }
else if(PlayerInfo[targetid][pJob] == 14) { jtext = "Bus Driver"; }
else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Farmer"; }
else if(PlayerInfo[targetid][pJob] == 17) { jtext = "Bomb Dealer"; }
else { jtext = "none"; }
new drank[20];
if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Power User"; }
else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Donater"; }
else { drank = "none"; }
new married[20];
strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
//new tbans = PlayerInfo[targetid][pTBanCount];
new pdtime = PlayerInfo[targetid][pPayDayTime];
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 warrests = PlayerInfo[targetid][pWantedDeaths];
new drugs = PlayerInfo[targetid][pWeed]+PlayerInfo[targetid][pLSD]+PlayerInfo[targetid][pKokain]+PlayerInfo[targetid][pCrack]+PlayerInfo[targetid][pHeroin];
new mats = PlayerInfo[targetid][pMats];
new bombmats = PlayerInfo[targetid][pBombs];
new wanted = WantedLevel[targetid];
new wantedpoints = WantedPoints[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 vworld = GetPlayerVirtualWorld(targetid);
new Float:shealth = PlayerInfo[targetid][pSHealth];
new adrugs = PlayerInfo[targetid][armordrugs];
new bombs = PlayerInfo[targetid][pBomb];
new Float:health;
new name[MAX_PLAYER_NAME];
new joblock[256];
new jobinvite[256];
new stopdrivers[256];
new stopFlying[256];
new stopSailing[256];
new stopWeapon[256];
new stopFishing[256];
new stopBike[256];
new warns = PlayerInfo[targetid][pWarns];
GetPlayerName(targetid, name, sizeof(name));
GetPlayerHealth(targetid,health);
new Float:px,Float:py,Float:pz;
GetPlayerPos(targetid, px, py, pz);
new coordsstring[256];
SendClientMessage(playerid, COLOR_STATS,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] SpawnHealth:[%.1f] Money:[$%d] Bank:[$%d]", level,atext,age,otext,shealth+50, cash, account);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
format(coordsstring, sizeof(coordsstring), "House No.:[%d] PlayingHours:[%d] NextLevel:[$%d] Respect:[%d/%d] Ph:[%d] Disease:[%s] AccountStatus:[%s]",housekey,ptime,costlevel,exp,expamount,pnumber,dtext,drank);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
format(coordsstring, sizeof(coordsstring), "Kills:[%d] Death:[%d] Fish:[%d] BiggestFish:[%d] LottoNr:[%d] Married-to:[%s] PayDayTime:[%d/60]",kills,deaths,fishes,bigfish,lotto,married,pdtime);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
format(coordsstring, sizeof(coordsstring), "Crimes:[%d] JailTime:[%d] WantedDeath:[%d] WantedLevel:[%d] WantedPoints:[%d]",crimes,arrests,warrests,wanted,wantedpoints);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "Drug:[%d] ArmorDrugs:[%d] Bombs:[%d] Materials:[%d] BombMaterials:[%d]",drugs,adrugs,bombs,mats,bombmats);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
format(coordsstring, sizeof(coordsstring), "Team:[%s] Organisation:[%s] Family:[%s] Rank:[%s] Job:[%s]",ttext,ftext,f2text,rtext,jtext);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
/*if(PlayerInfo[playerid][pTBanCount] >= 1)
{
format(coordsstring, sizeof(coordsstring), "Time ban: %d/5",tbans);
SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
}*/
if(PlayerInfo[playerid][pWarns] == 1)
{
format(coordsstring, sizeof(coordsstring), "Warnings: [%d]",warns);
SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
}
if(PlayerInfo[playerid][pWarns] == 2)
{
format(coordsstring, sizeof(coordsstring), "Warnings: [%d]",warns);
SendClientMessage(playerid, COLOR_RED2,coordsstring);
}
-
Bin grad dabei.
-
Cool danke Drake währ echt nice wenn du mir da richtig helfen könntest.
-
Ist halt schon spät, und bin grad müde.
Aber kommentier das hier mal aus:
Spoiler anzeigen
SendClientMessage(playerid, COLOR_STATS,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] SpawnHealth:[%.1f] Money:[$%d] Bank:[$%d]", level,atext,age,otext,shealth+50, cash, account);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
format(coordsstring, sizeof(coordsstring), "House No.:[%d] PlayingHours:[%d] NextLevel:[$%d] Respect:[%d/%d] Ph:[%d] Disease:[%s] AccountStatus:[%s]",housekey,ptime,costlevel,exp,expamount,pnumber,dtext,drank);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
format(coordsstring, sizeof(coordsstring), "Kills:[%d] Death:[%d] Fish:[%d] BiggestFish:[%d] LottoNr:[%d] Married-to:[%s] PayDayTime:[%d/60]",kills,deaths,fishes,bigfish,lotto,married,pdtime);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
format(coordsstring, sizeof(coordsstring), "Crimes:[%d] JailTime:[%d] WantedDeath:[%d] WantedLevel:[%d] WantedPoints:[%d]",crimes,arrests,warrests,wanted,wantedpoints);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "Drug:[%d] ArmorDrugs:[%d] Bombs:[%d] Materials:[%d] BombMaterials:[%d]",drugs,adrugs,bombs,mats,bombmats);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
format(coordsstring, sizeof(coordsstring), "Team:[%s] Organisation:[%s] Family:[%s] Rank:[%s] Job:[%s]",ttext,ftext,f2text,rtext,jtext);
SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
Also mit /* am anfang und */ am EndeUnd füg dies hier dafür mal ein.
format(string, 128, "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] SpawnHealth:[%.1f] Money:[$%d] Bank:[$%d]\n \
House No.:[%d] PlayingHours:[%d] NextLevel:[$%d] Respect:[%d/%d] Ph:[%d] Disease:[%s] AccountStatus:[%s]\n \
Kills:[%d] Death:[%d] Fish:[%d] BiggestFish:[%d] LottoNr:[%d] Married-to:[%s] PayDayTime:[%d/60]\n \
Crimes:[%d] JailTime:[%d] WantedDeath:[%d] WantedLevel:[%d] WantedPoints:[%d]\n \
Drug:[%d] ArmorDrugs:[%d] Bombs:[%d] Materials:[%d] BombMaterials:[%d]\n \
Team:[%s] Organisation:[%s] Family:[%s] Rank:[%s] Job:[%s]", level,atext,age,otext,shealth+50, cash, account,housekey,ptime,costlevel,exp,expamount,pnumber,dtext,drank,kills,deaths,fishes,bigfish,lotto,married,pdtime,crimes,arrests,warrests,wanted,wantedpoints,drugs,adrugs,bombs,mats,bombmats);
ShowPlayerDialog(playerid, 666, coordsstring,DIALOG_STYLE_MSGBOX, "Statistiken",string, "Ok", "Schließen");
Mein inneres Gefühl sagt mir, es funktioniert nich. Aber probieren geht
über Studieren. -
Du hast unrecht es funktioniert beim Compillen nicht es kommen 5 Errors die hier.
Zitat(13503) : error 075: input line too long (after substitutions)
(13504) : error 017: undefined symbol "string"
(13504) : error 029: invalid expression, assumed zero
(13504) : error 029: invalid expression, assumed zero
(13504) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Es sind die 2 zeilen
Drug:[%d] ArmorDrugs:[%d] Bombs:[%d] Materials:[%d] BombMaterials:[%d]\n \
Team:[%s] Organisation:[%s] Family:[%s] Rank:[%s] Job:[%s]", level,atext,age,otext,shealth+50, cash, account,housekey,ptime,costlevel,exp,expamount,pnumber,dtext,drank,kills,deaths,fishes,bigfish,lotto,married,pdtime,crimes,arrests,warrests,wanted,wantedpoints,drugs,adrugs,bombs,mats,bombmats); -
Puh ich kann grad garnicht mehr.
Hoffe dir hilft jemand anderes.
Bind schon voll müde.Viel glück trozdem.
So sehe ich jetzt nichts falsches.
-
Mhh ich weiss auch nicht was falsch ist irgend wie was mit string aber was mhh ?
PLS Help