Код:
ShowStats(playerid,targetid)
{
if(IsPlayerConnected(targetid)) {
new cash = GetPlayerCash(targetid);
new sext[16], std[20], employer[64], rank[64], division[64], jtext2[20], jtext[20], pnumber[20], facfam[64];
if(PlayerInfo[targetid][pPnumber] == 0) pnumber = "None"; else format(pnumber, sizeof(pnumber), "%d", PlayerInfo[targetid][pPnumber]);
if(PlayerInfo[targetid][pSex] == 1) { sext = "Male"; } else { sext = "Female"; }
switch(STDPlayer[targetid])
{
// strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
}
new upgradep = PlayerInfo[targetid][gPupgrade];
new age = PlayerInfo[targetid][pAge];
new ptime = PlayerInfo[targetid][pConnectTime];
new bigfish = PlayerInfo[targetid][pBiggestFish];
new crimes = PlayerInfo[targetid][pCrimes];
new arrests = PlayerInfo[targetid][pArrested];
new pot = PlayerInfo[targetid][pPot];
new crack = PlayerInfo[targetid][pCrack];
new heroin = PlayerInfo[targetid][pHeroin];
new mats = PlayerInfo[targetid][pMats];
new wanted = PlayerInfo[targetid][pWantedLevel];
new level = PlayerInfo[targetid][pLevel];
new exp = PlayerInfo[targetid][pExp];
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 housekey2 = PlayerInfo[targetid][pPhousekey2];
new rentkey = PlayerInfo[targetid][pRenting];
new radiofreq = PlayerInfo[targetid][pRadioFreq];
new intir = GetPlayerInterior(targetid);
new tokens = PlayerInfo[targetid][pTokens];
new ptokens = PlayerInfo[targetid][pPaintTokens];
new checks = PlayerInfo[targetid][pChecks];
new Float:shealth = PlayerInfo[targetid][pSHealth];
//new Float:sarmor = PlayerInfo[targetid][pSArmor];
new Float:health, Float:armor;
new packages = GetPVarInt(targetid, "Packages");
new crates = PlayerInfo[targetid][pCrates];
new rope = PlayerInfo[targetid][pRope],
rag = PlayerInfo[targetid][pRag],
cigars = PlayerInfo[targetid][pCigar],
sprunk = PlayerInfo[targetid][pSprunk],
spray = PlayerInfo[targetid][pSpraycan],
opium = PlayerInfo[targetid][pRawOpium],
realvw = GetPlayerVirtualWorld(targetid),
vw = PlayerInfo[targetid][pVW],
warns = PlayerInfo[targetid][pWarns],
jailt = PlayerInfo[targetid][pJailTime],
wjailt = PlayerInfo[targetid][pBeingSentenced];
GetPlayerHealth(targetid,health);
GetPlayerArmour(targetid,armor);
new Float:px,Float:py,Float:pz;
GetPlayerPos(targetid, px, py, pz);
new totalwealth;
new name[MAX_PLAYER_NAME];
GetPlayerName(targetid, name, sizeof(name));
new nmutes = PlayerInfo[targetid][pNMuteTotal];
new admutes = PlayerInfo[targetid][pADMuteTotal];
new oocmutes = PlayerInfo[targetid][pOOCMuteTotal];
new rpskill = PlayerInfo[targetid][pRPSkill];
totalwealth = account + cash;
// if(PlayerInfo[targetid][pPhousekey] != INVALID_HOUSE_ID && strcmp(name, HouseInfo[PlayerInfo[targetid][pPhousekey]][hOwner], true) == 0) totalwealth += HouseInfo[PlayerInfo[targetid][pPhousekey]][hSafeMoney];
// if(PlayerInfo[targetid][pPhousekey2] != INVALID_HOUSE_ID && strcmp(name, HouseInfo[PlayerInfo[targetid][pPhousekey2]][hOwner], true) == 0) totalwealth += HouseInfo[PlayerInfo[targetid][pPhousekey2]][hSafeMoney];
new coordsstring[268], str[3000];
format(coordsstring, sizeof(coordsstring),"%s - Level %d | %s | Age: %d | Total wealth: $%d | Playing hours: %d | Phone number: %s | RP Skill: %d\n", GetPlayerNameEx(targetid), level, sext, age, totalwealth, ptime, pnumber, rpskill);
strcat(str, coordsstring);
format(coordsstring, sizeof(coordsstring), "Cash: $%d | Bank balance: $%d | Upgrade points: %d | Spawn armor: %.0f | Next level: %d/%d hours ($%d)\n", cash, account, upgradep, shealth, exp, expamount, costlevel);
strcat(str, coordsstring);
format(coordsstring, sizeof(coordsstring), "%s: %s | Rank: %s (%d) | Division: %s | Job: %s (level: %d) | Job 2: %s (level: %d)\n", facfam, employer, rank, PlayerInfo[targetid][pRank], division, jtext,jlevel,jtext2, jlevel2);
strcat(str, coordsstring);
format(coordsstring, sizeof(coordsstring), "Crimes: %d | Arrests: %d | Insurance: %s | Wanted level: %d | Health: %.1f | Armor: %.1f | Paintball Tokens: %d | Married to: %s\n",crimes,arrests,insur, wanted, health, armor, ptokens, married);
strcat(str, coordsstring);
format(coordsstring, sizeof(coordsstring), "Biggest fish: %d | Pot: %d | Crack: %d | Heroin: %d | Opium: %d | Packages: %d | Crates: %d | Radio frequency: %d mhz\n",bigfish,pot,crack,heroin,opium,packages,crates, radiofreq);
strcat(str, coordsstring);
format(coordsstring, sizeof(coordsstring), "Materials: %d | Rope: %d | Rag: %d | Cigars: %d | Sprunk: %d | Spray: %d | Screwdrivers: %d | VIP tokens: %d | Checks: %d | VIP: %s\n",mats,rope,rag,cigars,sprunk,spray, PlayerInfo[targetid][pScrewdriver],tokens,checks,drank);
strcat(str, coordsstring);
format(coordsstring, sizeof(coordsstring), "Meth: %d | Acid: %d L | Cold Meds: %d | Baking Soda: %d | CDL Trucking Level: %d | CDL Trucking XP: %d\n", PlayerInfo[targetid][pMeth], PlayerInfo[targetid][pBatteryAcid], PlayerInfo[targetid][pColdMeds], PlayerInfo[targetid][pCrackStuff], PlayerInfo[targetid][pTruckingLevel],PlayerInfo[targetid][pTruckingXP]);
strcat(str, coordsstring);
format(coordsstring, sizeof(coordsstring), "OOCMutes: %d | ADMutes: %d | NMutes: %d | RMutes: %d | Weapons Restricted: %d | Gang Warns: %d | Warnings: %d\n", oocmutes, admutes, nmutes, PlayerInfo[targetid][pRMutedTotal],PlayerInfo[targetid][pWRestricted], PlayerInfo[targetid][pGangWarn], warns);
strcat(str, coordsstring);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
format(coordsstring, sizeof(coordsstring), "House: %d | House 2: %d | Renting: %d | Int: %d | VW: %d | Real VW: %d | Jail: %d sec | WJail: %d sec | AFK: %i\n", housekey,housekey2,rentkey,intir,vw,realvw,jailt,wjailt, playerAFKTime[targetid]);
strcat(str, coordsstring);
}
}
ShowPlayerDialog(playerid, DIALOG_SHOW_INFO, DIALOG_STYLE_MSGBOX, "{33AA33}General Player Information", "Ok", "Close");
}
}