Liebe Community,
Ich habe mir ein neuen /stats befehl gemacht, aber beim Compilen kommt "Pawno reagiert nicht mehr". Warum?
Der Befehl:
if (strcmp("/stats1", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pOwnPerso] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Du besitzt keinen Personalausweis.");
return 1;
}
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new string[128];
new ftext[20];
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 = "U.S.A."; }
else if(PlayerInfo[targetid][pOrigin] == 2) { otext = "Europa"; }
else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Asien"; }
new ttext[20];
if(PlayerInfo[targetid][pMember] == 0 || PlayerInfo[targetid][pLeader] == 0) { ttext = "-"; }
else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "San Andreas Police Department"; }
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "Federal Bureau of Investigation"; }
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "U.S. Army"; }
else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "San Andreas Medical Department"; }
else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "Russische Mafia"; }
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Triaden"; }
else if(PlayerInfo[targetid][pMember] == 7 || PlayerInfo[targetid][pLeader] == 7) { ttext = "U.S. Regierung"; }
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitman"; }
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "San News"; }
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxi-Unternehmen"; }
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "Fahrschule"; }
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12) { ttext = "Grove Street"; }
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 13) { ttext = "Ballas"; }
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 14) { ttext = "San Andreas Biker"; }
else if(PlayerInfo[targetid][pMember] == 13 || PlayerInfo[targetid][pLeader] == 15) { ttext = "San Fierro Rifa"; }
else if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 16) { ttext = "Ordnungsamt"; }
//
if(PlayerInfo[targetid][pDonateRank] == 0) { drank = "-"; }
else if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Premium"; }
else if(PlayerInfo[targetid][pDonateRank] == 2) { drank = "(+)Premium"; }
else if(PlayerInfo[targetid][pDonateRank] == 3) { drank = "(Elite-)Premium"; }
else if(PlayerInfo[targetid][pDonateRank] == 4) { drank = "(SP+)Premium"; }
//
new dtext[20];
if(STDPlayer[targetid] == 1) { dtext = "Chlamydien"; }
else if(STDPlayer[targetid] == 2) { dtext = "Gonorrhoe"; }
else if(STDPlayer[targetid] == 3) { dtext = "Syphilis"; }
else { dtext = "-"; }
//
new married[20];
strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
new name[MAX_PLAYER_NAME];
new age = PlayerInfo[targetid][pAge];
new account = PlayerInfo[targetid][pAccount];
new pnumber = PlayerInfo[targetid][pPnumber];
new level = PlayerInfo[targetid][pLevel];
new wanted = WantedLevel[targetid];
new costlevel = nxtlevel*levelcost;//10k for testing purposes
new expamount = nxtlevel*levelexp;
new drugs = PlayerInfo[targetid][pDrugs];
new mats = PlayerInfo[targetid][pMats];
new exp = PlayerInfo[targetid][pExp];
new kills = PlayerInfo[targetid][pKills];
new deaths = PlayerInfo[targetid][pDeaths];
new crimes = PlayerInfo[targetid][pCrimes];
new arrests = PlayerInfo[targetid][pArrested];
//
format(string,sizeof(string),"{FFFFFF}Hier findest du deinen Personalausweis, wenn du ihn jemanden zeigen willst schreibe /showperso.\n\n\n{FFA600}Allgemeine Daten{FFFFFF}\n\nName: %s\nAlter: %d\nHerkunft: %s\nGeschlecht: %s\nVerheiratet mit %s\nTelefonnummer:\n\nBankkonto: $%d\nGeld auf Hand: $%d\n\n\n{FFA600}Allgemeine Informationen{FFFFFF}\n\nLevel: %d\nLevelUp-Kosten: $%d\nRespektpunkte: %d von %d\nDonatorrang: %s\nWanteds: %d\nDrogen: %d\nMaterialien: %d\n\n\n{FFA600}Sonstige Daten & Informationen{FFFFFF}\n\nVerbrechen: %d\nGefängnise: %d\nKills: %d\nTode: %d\nKrankheit: %s",name,age,otext,atext,married,pnumber,account,cash,level,costlevel,exp,expamount,drank,wanted,drugs,mats,crimes,arrests,kills,deaths,dtext);
ShowPlayerDialog(playerid,STATS,DIALOG_STYLE_MSGBOX,"Personalausweis",string,"OK","");
}
return 1;
}
Ich hoffe ihr findet einen Fehler.
Mit freundlichen Grüßen,
James.Spader.