[POMOC] Stats

Započeo NeXxX, April 13, 2011, 18:38:47 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Kako da napravim /Stats kad ukucam /Stats pise samo "Taj i taj igrac gleda licnu kartu" Ali dole nema slike sa sadrzajem

dodaj ispod komande /stats i tamo di ti prikaze

new ime[MAX_PLAYER_NAME];
GetPlayerName(playerid, ime, sizeof(ime));
format(string, sizeof(string), "%s gleda licnu kartu", ime);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);



Johnny

U gm ctrl + F  ukucaj /stats i nadji komandu
Poslednja Izmena: April 13, 2011, 19:00:52 POSLE PODNE od Johnny[E]

Citat: [CH]Tiger poslato April 13, 2011, 18:45:59 POSLE PODNE
dodaj ispod komande /stats i tamo di ti prikaze

new ime[MAX_PLAYER_NAME];
GetPlayerName(playerid, ime, sizeof(ime));
format(string, sizeof(string), "%s gleda licnu kartu", ime);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

On ima to ali fali mu dole ono ostalo tj. respekti,level,posao itd.

poznaticovik


Citat: [AG] mafica .pwn poslato April 13, 2011, 19:27:23 POSLE PODNE
Citat: [CH]Tiger poslato April 13, 2011, 18:45:59 POSLE PODNE
dodaj ispod komande /stats i tamo di ti prikaze

new ime[MAX_PLAYER_NAME];
GetPlayerName(playerid, ime, sizeof(ime));
format(string, sizeof(string), "%s gleda licnu kartu", ime);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

On ima to ali fali mu dole ono ostalo tj. respekti,level,posao itd.
moj boze haha malo me jos hvata mamurluk od sinoc oprostite,evo ispravak:
mislim da koristis GF
pa evo
CTRL+F i napisi /stats" zamijeni sa ovime


       if (strcmp(cmd, "/stats", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
if (gPlayerLogged[playerid] != 0)
{
ShowStats(playerid,playerid);
new ime[MAX_PLAYER_NAME];  
GetPlayerName(playerid, ime, sizeof(ime));  
format(string, sizeof(string), "%s gleda licnu kartu", ime);  
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);  
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   You are not Logged in !");
}
}
return 1;
}


i sada opet CTRL+F i pronadi public ShowStats(playerid,targetid) i zamijeni sve sa ovime:
public ShowStats(playerid,targetid)
{
   if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new cash =  GetPlayerMoney(targetid);
new atext[20];
if(PlayerInfo[targetid][pSex] == 1) { atext = "Male"; }
else if(PlayerInfo[targetid][pSex] == 2) { atext = "Female"; }
  new otext[20];
if(PlayerInfo[targetid][pOrigin] == 1) { otext = "USA"; }
else if(PlayerInfo[targetid][pOrigin] == 2) { otext = "Europe"; }
else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Asia"; }
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 = "Officer"; }
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "National Guard"; }
else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Firemen/Paramedic"; }
else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "LCN"; }
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Yakuza"; }
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen"; }
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "News Reporter"; }
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxi"; }
else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "School Instructor"; }
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 = "Yakuza"; }
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 = "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 = "Cadet"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Officer"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Sergeant"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Lieutenant"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Captain"; }
       else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Chief"; }
else { rtext = "Cadet"; }
}
else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
{
   if(PlayerInfo[targetid][pRank] == 1) { rtext = "Professional Staff"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Special Agent Trainee"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Special Agent"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent in Charge"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Assistant Director in Charge"; }
   else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
else { rtext = "Intern"; }
}
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 = "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 = "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 = "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 Jacker"; }
       else if(PlayerInfo[targetid][pJob] == 6) { jtext = "News Reporter"; }
       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 = "Bus Driver"; }
       else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
       else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
       else { jtext = "None"; }
new drank[20];
if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Power User"; }
else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Donater"; }
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 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 carkey = PlayerInfo[targetid][pPcarkey];
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_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] SpawnHealth:[%.1f] Cash:[$%d] Bank:[$%d] Ph:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
format(coordsstring, sizeof(coordsstring), "DonateRank:[%s] MarriedTo:[%s] PlayingHours:[%d] LottoNr:[%d] Job:[%s]", drank,married,ptime,lotto,jtext);
SendClientMessage(playerid, COLOR_GRAD3,coordsstring);
format(coordsstring, sizeof(coordsstring), "FishesCaught:[%d] BiggestFish:[%d] CrimesCommited:[%d] TimesArrested:[%d] WantedDeaths:[%d]", fishes,bigfish,crimes,arrests,warrests );
SendClientMessage(playerid, COLOR_GRAD4,coordsstring);
format(coordsstring, sizeof(coordsstring), "Kills:[%d] Deaths:[%d] NextLevel:[$%d] Respect:[%d/%d] WantedLevel:[%d] Family:[%s]",kills,deaths,costlevel,exp,expamount,wanted,f2text);
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
format(coordsstring, sizeof(coordsstring), "Drugs:[%d] Materials:[%d] Team:[%s] Disease:[%s] Organisation:[%s] Rank:[%s]",drugs,mats,ttext,dtext,ftext,rtext);
SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(coordsstring, sizeof(coordsstring), "HouseKey [%d] BusinessKey [%d] CarKey [%d] HireKey [%d] int:[%d] local[%d]", housekey,bizkey,carkey,HireCar[targetid],intir,local);
SendClientMessage(playerid, COLOR_GRAD6,coordsstring);
}
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
}
}
Poslednja Izmena: April 13, 2011, 19:32:51 POSLE PODNE od [CH]Tiger


Nije pronadjeno nista! Koristim BAlkan Mania mod rucno pravljen