pawn Код:
public ShowStats(playerid,targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new cash = GetPlayerCash(targetid);
new atext[20];
new jailtext[5];
if(PlayerData[targetid][pJailed] > 0) {jailtext = "Da";}
else {jailtext = "Nu";}
new Float:armour;
if(PlayerData[targetid][pSex] == 1) { atext = "Barbat"; }
else if(PlayerData[targetid][pSex] == 2) { atext = "Femeie"; }
new otext[20];
if(PlayerData[targetid][pOrigin] == 1) { otext = "Los Santos"; }
else if(PlayerData[targetid][pOrigin] == 2) { otext = "San Fierro"; }
new ttext[30];
if(PlayerData[targetid][pMember] == 0 && PlayerData[targetid][pLeader] == 0) { ttext = "Civil"; }
else if(PlayerData[targetid][pMember] == 1 || PlayerData[targetid][pLeader] == 1) { ttext = "Politia Romana"; }
else if(PlayerData[targetid][pMember] == 2 || PlayerData[targetid][pLeader] == 2) { ttext = "Serviciul Roman de Informatii"; }
else if(PlayerData[targetid][pMember] == 3 || PlayerData[targetid][pLeader] == 3) { ttext = "Armata Romana"; }
else if(PlayerData[targetid][pMember] == 4 || PlayerData[targetid][pLeader] == 4) { ttext = "S.M.U.R.D"; }
else if(PlayerData[targetid][pMember] == 5 || PlayerData[targetid][pLeader] == 5) { ttext = "Rromi"; }
else if(PlayerData[targetid][pMember] == 6 || PlayerData[targetid][pLeader] == 6) { ttext = "Taxi"; }
else if(PlayerData[targetid][pMember] == 7 || PlayerData[targetid][pLeader] == 7) { ttext = "School Instructor"; }
else if(PlayerData[targetid][pMember] == 8 || PlayerData[targetid][pLeader] == 8) { ttext = "Hitman Agency"; }
else if(PlayerData[targetid][pMember] == 9 || PlayerData[targetid][pLeader] == 9) { ttext = "News Reporter"; }
else if(PlayerData[targetid][pMember] == 10 || PlayerData[targetid][pLeader] == 10) { ttext = "Remorcari auto"; }
else if(PlayerData[targetid][pMember] == 11 || PlayerData[targetid][pLeader] == 11) { ttext = "Clanul Sadoveanu"; }
else if(PlayerData[targetid][pMember] == 12 || PlayerData[targetid][pLeader] == 12) { ttext = "Clanul Capone"; }
else if(PlayerData[targetid][pMember] == 13 || PlayerData[targetid][pLeader] == 13) { ttext = "Clanul Duduianu"; }
else if(PlayerData[targetid][pMember] == 14 || PlayerData[targetid][pLeader] == 14) { ttext = "Clanul Corsicanu"; }
else if(PlayerData[targetid][pMember] == 15 || PlayerData[targetid][pLeader] == 15) { ttext = "Clanul Tobosaru"; }
else if(PlayerData[targetid][pMember] == 16 || PlayerData[targetid][pLeader] == 16) { ttext = "Clanul Camataru"; }
new dtext[20];
if(STDPlayer[targetid] == 1) { dtext = "Clamadia"; }
else if(STDPlayer[targetid] == 2) { dtext = "Gonoreea"; }
else if(STDPlayer[targetid] == 3) { dtext = "Sifilis"; }
else { dtext = "None"; }
new rtext[64];
if(PlayerData[targetid][pLeader] == 5 || PlayerData[targetid][pLeader] == 5)//Rromi Ranks
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Puradel"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Boschetar"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Smardoi"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Cocalar"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Boss"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Bulibasa"; }
else { rtext = "Puradel"; }
}
else if(PlayerData[targetid][pMember] == 1 || PlayerData[targetid][pLeader] == 1)//PR Ranks
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Subinspector"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Inspector"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Subcomisar"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Comisar"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Comisar Sef"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Chestor"; }
else { rtext = "Cadet"; }
}
else if(PlayerData[targetid][pMember] == 2 || PlayerData[targetid][pLeader] == 2)//SRI Ranks
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Adjunct"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Prim Adjunct"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Consilier"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Ambasador"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Vice Director"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Director"; }
else { rtext = "Intern"; }
}
else if(PlayerData[targetid][pMember] == 3 || PlayerData[targetid][pLeader] == 3)//Armata Romana Ranks
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Soldat"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Caporal"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Sergent"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Colonel"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "General"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Maresal"; }
else { rtext = "Soldat"; }
}
else if(PlayerData[targetid][pMember] == 5 || PlayerData[targetid][pLeader] == 5)//Rromi
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Puradel"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Boshetar"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Smardoi"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Cocalar"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Boss"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Bulibasa"; }
else { rtext = "Sofer"; }
}
else if(PlayerData[targetid][pMember] == 6 || PlayerData[targetid][pLeader] == 6)//taxi
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Sofer"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Taximetrist"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Contabil"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Dispecer"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Vice-Director"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Proprietar"; }
else { rtext = "Sofer"; }
}
else if(PlayerData[targetid][pMember] == 7 || PlayerData[targetid][pLeader] == 7)//s.i
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Stundent"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Dascal"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Profesor"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Director"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Decan"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Rector"; }
else { rtext = "Stundent"; }
}
else if(PlayerData[targetid][pMember] == 8 || PlayerData[targetid][pLeader] == 8)//hitman
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Copil"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Barbat"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Assasin"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Assasin Profesionist"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Vice Director"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Director"; }
else { rtext = "Copil"; }
}
else if(PlayerData[targetid][pMember] == 9 || PlayerData[targetid][pLeader] == 9)//news reporter
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Tipograf"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Cameraman"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Reporter"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Crainic"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Editor"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Producator"; }
else { rtext = "Tipograf"; }
}
else if(PlayerData[targetid][pMember] == 10 || PlayerData[targetid][pLeader] == 10)//remorcari auto
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Sofer"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Vulcanizator"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Mecanic"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Inginer"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Director"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Proprietar"; }
else { rtext = "Sofer"; }
}
else if(PlayerData[targetid][pMember] == 11 || PlayerData[targetid][pLeader] == 11 || PlayerData[targetid][pMember] == 12 || PlayerData[targetid][pLeader] == 12 || PlayerData[targetid][pMember] == 13 || PlayerData[targetid][pLeader] == 13 || PlayerData[targetid][pMember] == 14 || PlayerData[targetid][pLeader] == 14 || PlayerData[targetid][pMember] == 15 || PlayerData[targetid][pLeader] == 15 || PlayerData[targetid][pMember] == 16 || PlayerData[targetid][pLeader] == 16)
{
if(PlayerData[targetid][pRank] == 1) { rtext = "Incepator"; }
else if(PlayerData[targetid][pRank] == 2) { rtext = "Profesionist"; }
else if(PlayerData[targetid][pRank] == 3) { rtext = "Afacerist"; }
else if(PlayerData[targetid][pRank] == 4) { rtext = "Mafiot"; }
else if(PlayerData[targetid][pRank] == 5) { rtext = "Sub-Sef"; }
else if(PlayerData[targetid][pRank] == 6) { rtext = "Sefu"; }
else { rtext = "Incepator"; }
}
else
{
rtext = "None";
}
new jtext[20];
if(PlayerData[targetid][pJob] == 1) { jtext = "Detectiv"; }
else if(PlayerData[targetid][pJob] == 2) { jtext = "Avocat"; }
else if(PlayerData[targetid][pJob] == 3) { jtext = "Prostituata"; }
else if(PlayerData[targetid][pJob] == 4) { jtext = "Dealer de Droguri"; }
else if(PlayerData[targetid][pJob] == 5) { jtext = "Spargator de masini"; }
else if(PlayerData[targetid][pJob] == 6) { jtext = "Reporter TV"; }
else if(PlayerData[targetid][pJob] == 7) { jtext = "Mecanic"; }
else if(PlayerData[targetid][pJob] == 8) { jtext = "Bodyguard"; }
else if(PlayerData[targetid][pJob] == 9) { jtext = "Dealer de Arme"; }
else if(PlayerData[targetid][pJob] == 10) { jtext = "Dealer de Masini"; }
else if(PlayerData[targetid][pJob] == 12) { jtext = "Boxer"; }
else if(PlayerData[targetid][pJob] == 15) { jtext = "Vanzator de Ziare"; }
else if(PlayerData[targetid][pJob] == 16) { jtext = "Camionagiu"; }
else if(PlayerData[targetid][pJob] == 17) { jtext = "Fermier"; }
else if(PlayerData[targetid][pJob] == 17) { jtext = "Gunoier"; }
else if(PlayerData[targetid][pJob] == 20) { jtext = "Maturator"; }
else if(PlayerData[targetid][pJob] == 21) { jtext = "Maturator de Strada"; }
else { jtext = "None"; }
new drank[64];
if(PlayerData[targetid][pDonateRank] == 1) { drank = "{A67D3D}Bronz{FFFFFF}"; }
else if(PlayerData[targetid][pDonateRank] == 2) { drank = "{C0C0C0}Argint{FFFFFF}"; }
else if(PlayerData[targetid][pDonateRank] >= 3) { drank = "{D9D919}Aur{FFFFFF}"; }
else { drank = "None"; }
new married[50];
strmid(married, PlayerData[targetid][pMarriedTo], 0, strlen(PlayerData[targetid][pMarriedTo]), 50);
new age = PlayerData[targetid][pAge];
new fp = PlayerData[targetid][pFpunish];
new ptime = PlayerData[targetid][pConnectTime];
//new fishes = PlayerData[targetid][pFishes];
//new bigfish = PlayerData[targetid][pBiggestFish];
//new crimes = PlayerData[targetid][pCrimes];
//new arrests = PlayerData[targetid][pArrested];
//new warrests = PlayerData[targetid][pWantedDeaths];
new drugs = PlayerData[targetid][pDrugs];
new mats = PlayerData[targetid][pMats];
new wanted = WantedLevel[targetid];
new level = PlayerData[targetid][pLevel];
new exp = PlayerData[targetid][pExp];
//new pnumber = PlayerData[targetid][pPnumber];
new account = PlayerData[targetid][pAccount];
new nxtlevel = PlayerData[targetid][pLevel]+1;
new expamount = nxtlevel*levelexp;
new costlevel = nxtlevel*levelcost;//10k for testing purposes
new housekey = PlayerData[targetid][pPhousekey];
new bizkey = PlayerData[targetid][pPbiskey];
new Float:health;
new name[MAX_PLAYER_NAME];
GetPlayerName(targetid, name, sizeof(name));
GetPlayerHealth(targetid,health);
GetPlayerArmour(targetid,armour);
new playersip[256];
GetPlayerIp(targetid,playersip,sizeof(playersip));
new skin = PlayerData[targetid][pChar];
new interior = PlayerData[targetid][pInt];
new local = PlayerData[targetid][pLocal];
new vw = GetPlayerVirtualWorld(targetid);
new email[64];
strmid(email, PlayerData[targetid][pEmail], 0, strlen(PlayerData[targetid][pEmail]), 64);
new cheie;
if(PlayerData[targetid][pPcarkey] == 999)
{
cheie = 999;
}
else
{
cheie = PlayerData[targetid][pPcarkey] + PreVehicle;
}
new cheie2;
if(PlayerData[targetid][pPcarkey2] == 999)
{
cheie2 = 999;
}
else
{
cheie2 = PlayerData[targetid][pPcarkey2] + PreVehicle;
}
new cheie3;
if(PlayerData[targetid][pPcarkey3] == 999)
{
cheie3 = 999;
}
else
{
cheie3 = PlayerData[targetid][pPcarkey3] + PreVehicle;
}
new imppaydaym[128];
imppaydaym = FormatNumber(PlayerData[targetid][pImpPayDay], 0, '.');
new imprumutm[128];
imprumutm = FormatNumber(PlayerData[targetid][pImprumut], 0, '.');
//FormatNumber(imppaydaym);
//FormatNumber(imprumutm);
new Float:px,Float:py,Float:pz;
GetPlayerPos(targetid, px, py, pz);
new coordsstring[256];
new finalstring[1024];
//format(coordsstring, sizeof(coordsstring),"{B20000}________________________________________{FFFFFF}[%s (%d)]{B20000}________________________________________",name,targetid);
//strcat(finalstring, coordsstring, sizeof(coordsstring));
//format(coordsstring, sizeof(coordsstring),"*** %s [ID:%d] ***",name,targetid);
//strcat(finalstring, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "| Level: %d | Sex: %s | Varsta: %d | Casatorit cu: %s | Slujba: %s |\n", level, atext, age, married, jtext);
strcat(finalstring, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "| Donator de %s | Bani: $%s | Banca: $%s | Imprumut: $%s/$%s | Tel: %d |\n", drank, FormatNumber(cash, 0, '.'), FormatNumber(account, 0, '.'),imppaydaym,imprumutm,PlayerData[targetid][pPnumber]);
strcat(finalstring, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "| PretLevel: $%s | Ore jucate: %d | Respect: %d/%d | Wanted level: %d | Jailed: %s, %d sec | PuncteRob: %d/10 |\n", FormatNumber(costlevel, 0, '.'), ptime, exp, expamount, wanted,jailtext,PlayerData[targetid][pJailTime], PlayerData[targetid][pRob]);
strcat(finalstring, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "| Factiune: %s | Rank: %s (%d) | Warns: %d/3 | FWarns: %d/3 | FPunish: %d/30 | Droguri: %d | Materiale: %d |\n", ttext, rtext, PlayerData[targetid][pRank], PlayerData[targetid][pWarns], PlayerData[targetid][pFACWarns], fp, drugs, mats);
strcat(finalstring, coordsstring, sizeof(coordsstring));
//format(coordsstring, sizeof(coordsstring), "| Droguri:[%d] Materiale:[%d] Rob[%d/10] Factiune:[%s] Rank:[%s (%d)] WantedLevel:[%d] ",drugs,mats,PlayerData[targetid][pRob],rtext,PlayerData[targetid][pRank]);
//SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
ShowPlayerDialog(playerid, 14345, DIALOG_STYLE_MSGBOX, "Stats", coordsstring, "Close", "");
if (PlayerData[playerid][pAdmin] >= 1)
{
format(coordsstring, sizeof(coordsstring), "| House key: %d | BizKey: %d | Hire key: %d | Masina: %d | Moto: %d | Barca: %d | IP: %s |", housekey,bizkey,HireCar[targetid],cheie,cheie2,cheie3, playersip);
strcat(finalstring, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "| Skin: %d | Interior: %d | Virtual world: %d | Local: %d | Health: %.1f | Armour: %.1f | Email: %s |", skin, interior, vw, local, health, armour, email);
strcat(finalstring, coordsstring, sizeof(coordsstring));
}
//SendClientMessage(playerid, COLOR_WHITE,"{B20000}_____________________________________________________________________________________________________________");*/
}
}