Guten Tag liebe Community.
Wie einige vielleicht schon wissen, editiere ich ein GF...
Nun möchte ich aber, dass die Stats im Dialog angezeigt werden...
Geht das so einfach wie normal, oder muss man i-welche Sachen beachten?
Showstats:
public ShowStats(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];
new leader = PlayerInfo[targetid][pLeader];
new member = PlayerInfo[targetid][pMember];
if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Zivilist"; }
else
{
if(leader != 0) ttext = Fracs[leader-1];
if(member != 0) ttext = Fracs[member-1];
}
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 = "-"; }
new ftext[20];
if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
{ ftext = "Sanitärer"; }
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] == 11 || PlayerInfo[targetid][pLeader] == 11)
{ ftext = "Fahrlehrer"; }
else
{ ftext = "-"; }
new f2text[20];
if(PlayerInfo[targetid][pFMember] < 255) { f2text = FamilyInfo[PlayerInfo[targetid][pFMember]][FamilyName]; }
else { f2text = "-"; }
new rtext[64];
if(gTeam[targetid] == 5 || 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"; }
}
else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Auszubildender Polizist"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Ausgebildeter Polizist"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Streifenpolizist-Zufuß"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Polizeistreife-Auto"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Pressesprecher der Polizei"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Einsatzleitung"; }
else { rtext = "Cadet"; }
}
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Auszubildender Polizist"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Ausgebildeter Polizist"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Streifenpolizist-Zufuß"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Polizeistreife-Auto"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Pressesprecher der Polizei"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Einsatzleitung"; }
else { rtext = "Cadet"; }
}
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Private"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Sergeant"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Major"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Captain"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Lieutenant"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
else { rtext = "Private"; }
}
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)//Hitman Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Schwarzarbeiter"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Blutputze"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Lieferant"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Lagerarbeiter"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Sektretär"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Firmenbesitzer"; }
else { rtext = "Freelancer"; }
}
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)//NR Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Intern"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Local Reporter"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Local Editor"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Network Anchor"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Network Editor"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Network Producer"; }
else { rtext = "Intern"; }
}
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)//Taxi Company Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Taxi Rookie"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Cabbie"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Dispatcher"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Shift Supervisor"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Taxi Company Owner"; }
else { rtext = "Trainee"; }
}
else if(IsAnInstructor(targetid))//Driving/Flying School Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Instructor"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Senior Instructor"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Manager"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Under Boss"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
else { rtext = "Trainee"; }
}
else
{
rtext = "-";
}
new jtext[20];
if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detektiv"; }
else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Anwalt"; }
else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Hure"; }
else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Drogendealer"; }
else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Autodieb"; }
else if(PlayerInfo[targetid][pJob] == 6) { jtext = "Reporter"; }
else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Mechaniker"; }
else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Waffendealer"; }
else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Autohändler"; }
else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Boxer"; }
else if(PlayerInfo[targetid][pJob] == 14) { jtext = "Busfahrer"; }
else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Zeitungsjunge"; }
else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
else if(PlayerInfo[targetid][pJob] == 17) { jtext = "Müllmann"; }
else if(PlayerInfo[targetid][pJob] == 18) { jtext = "Angler"; }
else if(PlayerInfo[targetid][pJob] == 19) { jtext = "Pizzalieferer"; }
else { jtext = "-"; }
new drank[20];
if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Power User"; }
else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Donater"; }
else { drank = "-"; }
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 warrests = PlayerInfo[targetid][pWantedDeaths];
new drugs = PlayerInfo[targetid][pDrugs];
new mats = PlayerInfo[targetid][pMats];
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;
GetPlayerPos(targetid, px, py, pz);
new bullets[12], weapons[12], weapname[12][50], Float:plHealth, Float:plArmour, plIP[20];
GetPlayerWeaponData(targetid,1,weapons[0],bullets[0]); GetPlayerWeaponData(targetid,2,weapons[1],bullets[1]);
GetPlayerWeaponData(targetid,3,weapons[2],bullets[2]); GetPlayerWeaponData(targetid,4,weapons[3],bullets[3]);
GetPlayerWeaponData(targetid,5,weapons[4],bullets[4]); GetPlayerWeaponData(targetid,6,weapons[5],bullets[5]);
GetPlayerWeaponData(targetid,7,weapons[6],bullets[6]); GetPlayerWeaponData(targetid,8,weapons[7],bullets[7]);
GetPlayerWeaponData(targetid,9,weapons[8],bullets[8]); GetPlayerWeaponData(targetid,10,weapons[9],bullets[9]);
GetPlayerWeaponData(targetid,11,weapons[10],bullets[10]); GetPlayerWeaponData(targetid,12,weapons[11],bullets[11]);
GetWeaponName(weapons[0],weapname[0],50); GetWeaponName(weapons[1],weapname[1],50); GetWeaponName(weapons[2],weapname[2],50);
GetWeaponName(weapons[3],weapname[3],50); GetWeaponName(weapons[4],weapname[4],50); GetWeaponName(weapons[5],weapname[5],50);
GetWeaponName(weapons[6],weapname[6],50); GetWeaponName(weapons[7],weapname[7],50); GetWeaponName(weapons[8],weapname[8],50);
GetWeaponName(weapons[9],weapname[9],50); GetWeaponName(weapons[10],weapname[10],50); GetWeaponName(weapons[11],weapname[11],50);
GetPlayerHealth(targetid,plHealth);
GetPlayerArmour(targetid,plArmour);
GetPlayerIp(targetid,plIP,sizeof(plIP));
new coordsstring[256];
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "Level:[%d] Geschlecht:[%s] Alter:[%d] Herkunft:[%s] Spawnenergie:[%.1f] Geld:[$%d] Bank:[$%d] Ph:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
format(coordsstring, sizeof(coordsstring), "Premium Rang:[%s] Verheiratet:[%s] Spielzeit:[%d] LottoNr:[%d] Job:[%s]", drank,married,ptime,lotto,jtext);
SendClientMessage(playerid, COLOR_GRAD3,coordsstring);
format(coordsstring, sizeof(coordsstring), "FishesCaught:[%d] GrösterFisch:[%d] Verbrechen:[%d] Gefängniszeit:[%d] Gesucht:[%d]", fishes,bigfish,crimes,arrests,warrests );
SendClientMessage(playerid, COLOR_GRAD4,coordsstring);
format(coordsstring, sizeof(coordsstring), "Kills:[%d] Tode:[%d] Nächstes Level:[$%d] Respekt:[%d/%d] WantedLevel:[%d] Familie:[%s]",kills,deaths,costlevel,exp,expamount,wanted,f2text);
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
format(coordsstring, sizeof(coordsstring), "Drugs:[%d] Materials:[%d] Team:[%s] Krankheit:[%s] Organisation:[%s] Rank:[%s]",drugs,mats,ttext,dtext,ftext,rtext);
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
format(coordsstring, sizeof(coordsstring), "Spielminuten seit Login: [%d] Spielminuten bis zum PayDay: [%d] Spielminuten Insgesamt: [%d]",PlayerInfo[targetid][pMinutesSinceLogin],(60-PlayerInfo[targetid][pPlayMinutes]),PlayerInfo[targetid][pGesamtMinutes]);
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pSupporter] >= 1)
{
format(coordsstring,sizeof(coordsstring),"House key [%d] Business key [%d] HireKey [%d] int [%d] local [%d]", housekey,bizkey,HireCar[targetid],intir,local);
SendClientMessage(playerid,COLOR_GRAD6,coordsstring);
format(coordsstring,sizeof(coordsstring),"Waffen: %s[0] %s[%d] %s[%d] %s[%d] %s[%d] %s[%d]",weapname[0],weapname[1],bullets[1],weapname[2],bullets[2],weapname[3],bullets[3],weapname[4],bullets[4],weapname[5],bullets[5]);
SendClientMessage(playerid,COLOR_GRAD6,coordsstring);
format(coordsstring,sizeof(coordsstring),"Waffen: %s[%d] %s[%d] %s[%d] %s[0] %s[0] %s[0]",weapname[6],bullets[6],weapname[7],bullets[7],weapname[8],bullets[8],weapname[9],weapname[10],weapname[11]);
SendClientMessage(playerid,COLOR_GRAD6,coordsstring);
format(coordsstring,sizeof(coordsstring),"Health [%.2f] Armour [%.2f] IP[%s] Ping [%d] Warns[%d]",plHealth,plArmour,plIP,GetPlayerPing(targetid),PlayerInfo[targetid][pWarns]);
SendClientMessage(playerid,COLOR_GRAD6,coordsstring);
}
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
}