[Pomoc]Stats

Započeo Cimbur, Oktobar 20, 2012, 15:03:41 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:GTA RP
Detaljan opis problema:Ovako, stats mi je u fazonu SendClientMessage-ra, a ja zelim da mi bude slican kao na B.E
Dio skripte:/
Neke slike/video za lakse dobivanje pomoci(neobavezno): http://slike.milf-hosting.info/images/1343074004.jpg
RESPECT :
Vegas & C++

Preko DIALOG_STYLE_MSGBOX napravis... Ili ako oces, ja cu ti napraviti, samo mi daj stats

ColdPlay, nisam bas neki profi, tako da ne znam, trudio sam se, ali ono, ne vredi
Evo ti stats :
if (strcmp(cmd, "/stats", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (gPlayerLogged[playerid] != 0)
{
ShowStats(playerid,playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* %s flips open his PDA", sendername);
    ProxDetector(10.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;
}

Reci sta jos treba; ))
RESPECT :
Vegas & C++


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 = "LS"; }
else if(PlayerInfo[targetid][pOrigin] == 2) { otext = "SF"; }
else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "LV"; }
else if(PlayerInfo[targetid][pOrigin] == 4) { otext = "LC"; }
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 = "Police Department"; }
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 = "Surenos"; }
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "La Famiglia Sinatra"; }
else if(PlayerInfo[targetid][pMember] == 7 || PlayerInfo[targetid][pLeader] == 7) { ttext = "Government"; }
else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitman"; }
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"; }
//else if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 14) { ttext = "Yamaguchi"; }
else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15) { ttext = "47th Street Saints"; }
else if(PlayerInfo[targetid][pMember] == 16 || PlayerInfo[targetid][pLeader] == 16) { ttext = "East Beach Bloods"; }
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[30];
    if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)
{ ftext = "LSPD"; }
  if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)
{ ftext = "FBI"; }
        else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
{ ftext = "LSMD"; }
  else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
{ ftext = "Los Sureños 13"; }
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
{ ftext = "La Famiglia Sinatra"; }
else if(PlayerInfo[targetid][pMember] == 7 || PlayerInfo[targetid][pLeader] == 7)
{ ftext = "Government"; }
else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)
{ ftext = "SAN"; }
else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)
{ ftext = "TAXI"; }
//else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11)
//{ ftext = "License Faction"; }
//else if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 14)
//{ ftext = "Yamaguchi"; }
else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15)
{ ftext = "47th Street Saints"; }
else if(PlayerInfo[targetid][pMember] == 16 || PlayerInfo[targetid][pLeader] == 16)
{ ftext = "East Beach Bloods"; }
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 = "Police Officer"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Corporal"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Sergeant"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Lieutenant"; }
        else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Captain"; }
        else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Deputy Chief"; }
        else if(PlayerInfo[targetid][pRank] == 8) { 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] == 5 || PlayerInfo[targetid][pLeader] == 5)//Surenos Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Forastero"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Asociado"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Miembro"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Proscrito"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Mano Derecha"; }
  else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Corona"; }
else { rtext = "Guero"; }
}
else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)//Surenos Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Outsider"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Giovane D'honore"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Piciotto"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Sgarrista"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Capo Regime"; }
  else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Consiglieri"; }
  else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Capo Bastone"; }
  else if(PlayerInfo[targetid][pRank] == 8) { rtext = "Capo Crimini"; }
else { rtext = "Outsider"; }
}
else if(PlayerInfo[targetid][pMember] == 7)//Mayor ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Mayor's driver"; }
    else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Mayor's bodyguard"; }
    else if(PlayerInfo[targetid][pLeader] == 7) { rtext = "Mayor"; }
    else { rtext = "None"; }
}
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 Worker"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Journalist"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Head Journalist"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Company Secretary"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "ABC Manager"; }
    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Network Producer"; }
else { rtext = "Intern Worker"; }
}
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 if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 14)//Yamaguchi ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Gaij in"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Wakashu"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Shatei"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Capo"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Don's right hand"; }
  else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Don"; }
else { rtext = "Gaij in"; }
}
*/
else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15)//47th Street Saints Families gang Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Outsider"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Gangsta"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Thug"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Soulja"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "O.G"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Senior O.G"; }
  else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Top O.G"; }
else { rtext = "Outsider"; }
}
else if(PlayerInfo[targetid][pMember] == 16 || PlayerInfo[targetid][pLeader] == 16)//East Beach Bloods Ranks
{
    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Dumb Hoe"; }
else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Outsider"; }
else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Soulja"; }
else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Blood Pusher"; }
else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Blood Runner"; }
else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Thug"; }
    else if(PlayerInfo[targetid][pRank] == 7) { rtext = "O.G"; }
    else if(PlayerInfo[targetid][pRank] == 8) { rtext = "Double O.G"; }
    else if(PlayerInfo[targetid][pRank] == 9) { rtext = "Kingpin"; }
else { rtext = "Dumb Hoe"; }
}
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 if(PlayerInfo[targetid][pJob] == 17) { jtext = "Pizza Boy"; }
        else if(PlayerInfo[targetid][pJob] == 18) { jtext = "Farmer"; }
        else if(PlayerInfo[targetid][pJob] == 19) { jtext = "Illegal Farmer"; }
        else if(PlayerInfo[targetid][pJob] == 20) { jtext = "Drugs Smuggler"; }
        else if(PlayerInfo[targetid][pJob] == 21) { jtext = "Street sweeper"; }
        else if(PlayerInfo[targetid][pJob] == 22) { jtext = "Materials smuggler"; }
        else if(PlayerInfo[targetid][pJob] == 23) { jtext = "Gun maker"; }
        else { jtext = "None"; }
new drank[20];
if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Bronze donater"; }
else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Golden 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 crimes = PlayerInfo[targetid][pCrimes];
//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 carkey2 = PlayerInfo[targetid][pPcarkey2];
new carkey3 = PlayerInfo[targetid][pPcarkey3];
new intir = PlayerInfo[targetid][pInt];
new virworld = PlayerInfo[targetid][pVirWorld];
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_RED," ");
format(coordsstring, sizeof(coordsstring),"------------------------------------| %s |------------------------------------",name);
SendClientMessage(playerid, COLOR_RED,coordsstring);
format(coordsstring, sizeof(coordsstring), "- Level:[%d]  Sex:[%s]  Age:[%d]  Cash:[$%d]  Bank:[$%d]  Ph:[%d]", level,atext,age,cash,account,pnumber);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "- PlayingHours:[%d]  Job:[%s]  Respect:[%d/%d]  DonateRank:[%s]", ptime,jtext,exp,expamount,drank);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
format(coordsstring, sizeof(coordsstring), "- Drugs:[%d]  Materials:[%d]  Organisation:[%s]  Rank:[%s]",drugs,mats,ftext,rtext);
SendClientMessage(playerid, COLOR_WHITE,coordsstring);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(coordsstring, sizeof(coordsstring), "- House key [%d] Business key [%d] Veh1 [%d] Veh2 [%d] Veh3 [%d] HireKey [%d] int:[%d] virworld:[%d] local[%d]", housekey,bizkey,carkey,carkey2,carkey3,HireCar[targetid],intir,virworld,local);
SendClientMessage(playerid, COLOR_GRAD6,coordsstring);
}
SendClientMessage(playerid, COLOR_RED,"------------------------------------------------------------------------------------------------");
}
}
RESPECT :
Vegas & C++

Jel moze neko da mi uradi,hvala
RESPECT :
Vegas & C++