12.06.2012, 12:12
Hi .. im not so pro with pawn .. can someone make that /stats looks nice in ShowPlayerDialog
STATS :
STATS :
pawn Код:
public ShowStats(playerid,targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new cash = GetPlayerMoney(targetid);
new atext[20];
if(PlayerInfo[targetid][pSex] == 1) { atext = "Musko"; }
else if(PlayerInfo[targetid][pSex] == 2) { atext = "Zensko"; }
new otext[20];
if(PlayerInfo[targetid][pOrigin] == 1) { otext = "Hrvatska"; }
else if(PlayerInfo[targetid][pOrigin] == 2) { otext = "Srbija"; }
else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Makedonija"; }
else if(PlayerInfo[targetid][pOrigin] == 4) { otext = "Crna Gora"; }
else if(PlayerInfo[targetid][pOrigin] == 5) { otext = "Slovenija"; }
else if(PlayerInfo[targetid][pOrigin] == 6) { otext = "BiH"; }
new ttext[20];
if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civilian"; }
else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Policija"; }
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "SIPA"; }
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "Nacionalna garda"; }
else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Hitna"; }
else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "LCN"; }
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Grove Mafia"; }
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen"; }
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "UnderGroundRacer"; }
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxi"; }
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "Licenseri"; }
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12) { ttext = "Yakuza"; }
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 = "None"; }
new ftext[20];
if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
{ ftext = "Firemen/Paramedics"; }
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 = "Grove Mafia"; }
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11)
{ ftext = "License Faction"; }
else
{ ftext = "None"; }
new f2text[20];
if(PlayerInfo[targetid][pFMember] < 255) { f2text = FamilyInfo[PlayerInfo[targetid][pFMember]][FamilyName]; }
else { f2text = "None"; }
new rtext[64];
if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//The 2 Organisations
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "NoviClan"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Associate"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "MladjiClan"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "StarijiClan"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "PodLider"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Lider"; }
else { rtext = "NoviClan"; }
}
else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "PD.Ucenik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "PD.Policajac"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "PD.Agent"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "PD.Kapetan"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "PD.Porucnik"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "PD.Direktor"; }
else { rtext = "PD.Ucenik"; }
}
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "FBI.Agent"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "FBI.Presretac"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "FBI.Tajni Agent"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "FBI.Cobra"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "FBI.Zamenik"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "FBI.Direktor"; }
else { rtext = "FBI.Agent"; }
}
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "S:W:A:T.Vojnik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "S:W:A:T.Casnik"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "S:W:A:T.Deserter"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "S:W:A:T.General"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "S:W:A:T.Agent"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "S:W:A:T.Pukovnik"; }
else { rtext = "S:W:A:T.Vojnik"; }
}
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)//Hitman Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Freelancer"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Marksman"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Agent"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Vice-Director"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
else { rtext = "Freelancer"; }
}
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)//NR Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "UGR NoviClan"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "UGR LocalBandit"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "UGR Bnadit"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "UGR Spijun"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "UGR Podlider"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "UGR Lider."; }
else { rtext = "SkinHeads NoviClan"; }
}
else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)//NR Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "MD.Brat/Sestra"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "MD.Doktor"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "MD.Kirurg"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "MD.Spec.Kirurg"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "MD.Zamjenik"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "MD.Upravitelj"; }
else { rtext = "MD.Brat/Sestra"; }
}
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)//Taxi Company Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Taxi Ucenik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Taxi LocalVozac"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Taxi Vozac"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Taxi Clan "; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Taxi PodLider"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Taxi Lider"; }
else { rtext = "Taxi Ucenik"; }
}
else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12)//Yakuza Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "Ucenik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Yakuza Vozac"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Mafijas"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Profesionalac "; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Yakuza PodLider"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Yakuza Lider"; }
else { rtext = "Taxi Ucenik"; }
}
else if(IsAnInstructor(targetid))//grove mafia Ranks
{
if(PlayerInfo[targetid][pRank] == 1) { rtext = "LIC.Ucenik"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "LIC.Instruktor"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "LIC.Stariji Instruktor"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "LIC.Pro Instruktor"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "LIC.Zamjenik"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "LIC.Leader"; }
else { rtext = "LIC.Ucenik"; }
}
else
{
rtext = "None";
}
new jtext[20];
if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detective"; }
else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Lawyer"; }
else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Whore"; }
else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Drugs Dealer"; }
else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Car Jackert"; }
else if(PlayerInfo[targetid][pJob] == 6) { jtext = "TuningRace Club"; }
else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Car Mechanic"; }
else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Arms Dealer"; }
else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Car Dealer"; }
else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Boxer"; }
else if(PlayerInfo[targetid][pJob] == 14) { jtext = "GradonaVozac"; }
else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
else if(PlayerInfo[targetid][pJob] == 17) { jtext = "Donator"; }
else if(PlayerInfo[targetid][pJob] == 18) { jtext = "Postar"; }
else { jtext = "None"; }
new drank[20];
if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Donator"; }
else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Super Donator"; }
else { drank = "None"; }
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 crimes = PlayerInfo[targetid][pCrimes];
new arrests = PlayerInfo[targetid][pArrested];
new drugs = PlayerInfo[targetid][pDrugs];
new mats = PlayerInfo[targetid][pMats];
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 coordsstring[256];
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
SendClientMessage(playerid, COLOR_DOBRA,coordsstring);
format(coordsstring, sizeof(coordsstring), "Level:[%d] Spol:[%s] God:[%d] Drz:[%s] SpawnHealth:[%.1f] Novaca:[$%d] Bank:[$%d] Ph:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
format(coordsstring, sizeof(coordsstring), "DonateRank:[%s] OzenjenSa:[%s] SatiIgranja:[%d] LottoNr:[%d]", drank,married,ptime,lotto);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
format(coordsstring, sizeof(coordsstring), "KriminalaPocinjenih:[%d] TimesArrested:[%d] Posao:[%s]", crimes,arrests,jtext);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
format(coordsstring, sizeof(coordsstring), "Ubojstva:[%d] Smrti:[%d] SljedeciLvl:[$%d] Respect:[%d/%d] Obitelj:[%s]",kills,deaths,costlevel,exp,expamount,f2text);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
format(coordsstring, sizeof(coordsstring), "Droge:[%d] Materiali:[%d] Disease:[%s] Organizacija:[%s] Rank:[%s]",drugs,mats,dtext,ttext,rtext);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(coordsstring, sizeof(coordsstring), "House kljuc [%d] Business kljuc [%d] HireKey [%d] int:[%d] local[%d]", housekey,bizkey,HireCar[targetid],intir,local);
SendClientMessage(playerid, COLOR_GREEN,coordsstring);
}
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
}