Moin, ich hab ein Problem mit den stats per Gui:
Er zeigt zwar ein Gui Fenster, aber Ohne inhalt sprich es ist leer, wo liegt der Fehler?
Hier mein Code:
Oben
#define DIALOG_STATS 240000
/stats Befehl
if (strcmp(cmd, "/stats", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
ShowStats(playerid,playerid);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /stats",d,m,y,h,mi,s,sendername);
CommandLog(string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in!");
return 1;
}
}
return 1;
}
und hier der Stats Code
public ShowStats(playerid,targetid).................
new coordsstring[9][256],string2[256];
format(coordsstring[0], sizeof(coordsstring),"*** %s ***",name);
format(coordsstring[1], sizeof(coordsstring), "| Level:[%d] | Geschlecht:[%s] | Alter:[%d] | Geld:[$%d] | Bank:[$%d] | Ph:[%d] | Rank:[%s] |", level,atext,age,cash,account,pnumber,drank);
format(coordsstring[2], sizeof(coordsstring), "| Ges. Stunden:[%d] | Ges. Minuten:[%d] | Ges. Sekunden:[%d] | Größter Fisch:[%d] | Arestzeit:[%d] |",(ptime / 3600), (ptime / 60), ptime,bigfish,arrests);
format(coordsstring[3], sizeof(coordsstring), "| Respekt:[%d/%d] | Tode:[%d] | Drogen:[%d] | Material:[%d] | Team:[%s] | Rank:[%s] | Kills:[%d] | Warnungen:[%d] |",exp,expamount,Deaths,drugs,mats,ttext,rtext, Kills,warned);
format(coordsstring[4], sizeof(coordsstring), "| Swat Rank:[%s] | Tactical Rank:[%s] | Forces Rank:[%s] | DD Manager:[%d] | LottoNr:[%d] | Straftaten:[%d] |",swatr,tacticalr,specialfr,drights,lotto,crimes);
format(coordsstring[5], sizeof(coordsstring), "| Fighting:[%s] | Tester Rank:[%d] | ColtSkill:[%d] | Silenced Skill:[%d] | Deagle Skill:[%d] | Shotgun Skill:[%d] |",fight, tester, Colt,Silenced,Deagle, Shotgun);
format(coordsstring[6], sizeof(coordsstring), "| SawnSkill:[%d] | Combat Skill:[%d] | Uzi Skill:[%d] | SMG Skill:[%d] | M4 Skill:[%d] | AK-47 Skill:[%d] |", Sawn,Combat,Uzi, Smg, M4, Ak47);
format(coordsstring[7], sizeof(coordsstring), "| Health:[%.1f] | Armour:[%.1f] | IP:[%s] | Fishe:[%d] | Zul. Online:[%s] | Dienst Bann:[%d] |", health, armour, Playersip, fishes, PlayerInfo[targetid][pWhyLeft], dban);
format(coordsstring[8], sizeof(coordsstring), "| Haus:[%d] | Geschäft:[%d] | Mietsschlüssel:[%d] | Int.:[%d] | Vir. World:[%d] | Local:[%d] | Job:[%s] |", housekey,bizkey,HireCar[targetid],intir,virworld,local,jtext);
format(string2,sizeof(string2),"%s\n%s\n%s",coordsstring[0],coordsstring[1],coordsstring[2],coordsstring[3],coordsstring[4],coordsstring[5],coordsstring[6],coordsstring[7],coordsstring[8]);
ShowPlayerDialog(playerid, DIALOG_STYLE_MSGBOX, 240000, "Stats", string2, "Weiter", "Weiter");
/*if (PlayerInfo[targetid][pPcarkey] != 999)
{
new vehiclename[24];
GetVehicleName(carkey, vehiclename, sizeof(vehiclename));
format(coordsstring, sizeof(coordsstring), "| CarID: %d | Model: %s (%d) | VehValue: %d | VehColor1: %d | VehColor2: %d | VehLocked: %d | Code: %d |",carkey,vehiclename, CarInfo[carkey][cModel], GetVehiclePrice(carkey), CarInfo[carkey][cColorOne], CarInfo[carkey][cColorTwo], CarInfo[carkey][cLock], CarInfo[carkey][cCode]);
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
}
if (PlayerInfo[targetid][pPcarkey2] != 999)
{
new vehiclename[24];
GetVehicleName(carkey2, vehiclename, sizeof(vehiclename));
format(coordsstring, sizeof(coordsstring), "| CarID: %d | Model: %s (%d) | VehValue: %d | VehColor1: %d | VehColor2: %d | VehLocked: %d | Code: %d |",carkey2,vehiclename, CarInfo[carkey2][cModel], GetVehiclePrice(carkey2), CarInfo[carkey2][cColorOne], CarInfo[carkey2][cColorTwo], CarInfo[carkey2][cLock], CarInfo[carkey2][cCode]);
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
}*/
}
}