[POMOC] Komande /check i /stats

Započeo Rush, Februar 02, 2013, 17:20:19 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 6 gostiju pregledaju ovu temu.

Skripta koju koristim:CLRP
Detaljan opis problema:kad kucaj /check i id nekog igraca izbaci mi moje podatke i nmg ih zatvoriti a /stats kad kucam otvori mi sve kako treba alii nmg ni to zatvoriti
Dio skripte:/
Neke slike/video za lakse dobivanje pomoci(neobavezno):/

Daj /stats i /check komandu postaj.

Last nick: Paradox

Citat: Joey_ poslato Februar 02, 2013, 17:52:56 POSLE PODNE
Daj /stats i /check komandu postaj.
if (strcmp(cmd, "/check", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         if (PlayerInfo[playerid][pAdmin] >= 1)
         {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
               SendClientMessage(playerid, COLOR_GRAD1, "Koriscenje: /check [ID Igraca/Dio Imena]");
               return 1;
            }
               giveplayerid = ReturnUser(tmp);
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                  ShowStats(playerid,giveplayerid);
               }
            }
            else
            {
               SendClientMessage(playerid, COLOR_GRAD1, "   Nema takvog igraca");
            }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "   Niste admin");
         }
      }
      return 1;
   }
evo i stats
if (strcmp(cmd, "/stats", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
         if (gPlayerLogged[playerid] != 0)
         {
             if(!IsPlayerInAnyVehicle(playerid))
              {
               ShowStats(playerid,playerid);
               SetTimer("Statsoff", 10000, 0);
               SendClientMessage(playerid, YELLOW, " Da biras izmedju Meni-a pritisni space na tipkuvnici !");
               GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string), "* %s gleda svoju iskaznicu.", sendername);
                ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                else
                {
                SendClientMessage(playerid, COLOR_GRAD1, "Ne smijes biti u vozilu!");
                Statsoff(playerid);
                }
         }
         else
         {
            SendClientMessage(playerid, COLOR_GRAD1, "Niste prijavljeni!");
         }
      }
      return 1;
   }

I postaj ShowStats funkciju.

Last nick: Paradox

Citat: Joey_ poslato Februar 02, 2013, 18:24:16 POSLE PODNE
I postaj ShowStats funkciju.
public ShowStats(playerid,targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
   {
      new drank[20];
      if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "1"; }
      else if(PlayerInfo[targetid][pDonateRank] == 2) { drank = "2"; }
      else if(PlayerInfo[targetid][pDonateRank] >= 3) { drank = "3"; }
      else { drank = "Nema"; }
      new married[20];
      strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
      new ptime = PlayerInfo[targetid][pConnectTime];
      new deaths = PlayerInfo[targetid][pDeaths];
      new wanted = WantedLevel[targetid];
      new level = PlayerInfo[targetid][pLevel];
      new exp = PlayerInfo[targetid][pExp];
      new kills = PlayerInfo[targetid][pKills];
      new nxtlevel = PlayerInfo[targetid][pLevel]+1;
      new expamount = nxtlevel*levelexp;
      new housekey = PlayerInfo[targetid][pPhousekey];
      new bizkey = PlayerInfo[targetid][pPbiskey];
      new local = PlayerInfo[targetid][pLocal];
      new warns = PlayerInfo[targetid][pWarns];
      new poeni = PlayerInfo[playerid][pPayCheck]/225;
      new drugs = PlayerInfo[targetid][pDrugs];
      new mats = PlayerInfo[targetid][pMats];
      new name[MAX_PLAYER_NAME];
      GetPlayerName(targetid, name, sizeof(name));
      new Float:px,Float:py,Float:pz;
      GetPlayerPos(targetid, px, py, pz);
      new string[500];
      new string1[MAX_PLAYER_NAME];
      new string2[64];
      new string3[64];
      new string4[64];
      new string5[64];
      new string6[64];
      new coordsstring3[160];
      new coordsstring4[160];
      TextDrawShowForPlayer(playerid,Textdraw1);
      TextDrawShowForPlayer(playerid,Textdraw2);
      TextDrawShowForPlayer(playerid,Textdraw3);
      TextDrawShowForPlayer(playerid,Textdraw4);
      TextDrawShowForPlayer(playerid,Textdraw5);
      TextDrawShowForPlayer(playerid,Textdraw6);
      TextDrawShowForPlayer(playerid,Textdraw7);
      TextDrawShowForPlayer(playerid,Textdraw8);
      TextDrawShowForPlayer(playerid,Textdraw9);
      TextDrawShowForPlayer(playerid,Textdraw10);
      TextDrawShowForPlayer(playerid,Textdraw11);
      TextDrawShowForPlayer(playerid,Textdraw12);
      TextDrawShowForPlayer(playerid,Textdraw13);
      TextDrawShowForPlayer(playerid,Textdraw14);
      format(string1, sizeof(string1),"%s",name);
      format(string2, sizeof(string2),"%d/%d",exp,expamount);
      format(string3, sizeof(string3),"%d",level);
      format(string4, sizeof(string4),"%d",ptime);
      format(string5, sizeof(string5),"%d/6",poeni);
      format(string6, sizeof(string6),"%d/5",warns);
      format(coordsstring3, sizeof(coordsstring3),"\n{48E31C}- IgraSati:[%d]\n- Respekti:[%d/%d]\n- PayDay poeni[%d/6]\n- Ubojstva:[%d]\n- Smrti:[%d]\n- Wanted:[%d]\n- Droga:[%d]\n- Materijali:[%d]\n- Upozorenja[%d/5]",ptime,exp,expamount,poeni,kills,deaths,wanted,drugs,mats,warns);
      format(coordsstring4, sizeof(coordsstring4),"\n{FFFFFF}- Imovina:\n{48E31C}- Kuca:[%d]\n- Firma:[%d]\n- Local:[%d]\n- Donator:[%s]",housekey,bizkey,local,drank);
      format(string, 500," %s%s%s",coordsstring3,coordsstring4);
      PlayerInfo[playerid][pPrikazaniStatsi] = 1;
      PlayerInfo[playerid][pStats2] = 1;
      TextDrawSetString(Textdraw7,string1);
      TextDrawSetString(Textdraw8,string3);
      TextDrawSetString(Textdraw9,string2);
      TextDrawSetString(Textdraw10,string4);
      TextDrawSetString(Textdraw11,string5);
      TextDrawSetString(Textdraw12,string6);
   }
}
public ShowStats2(playerid,targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
   {
               TextDrawHideForPlayer(playerid,Textdraw1);
               TextDrawHideForPlayer(playerid,Textdraw2);
               TextDrawHideForPlayer(playerid,Textdraw3);
               TextDrawHideForPlayer(playerid,Textdraw4);
               TextDrawHideForPlayer(playerid,Textdraw5);
               TextDrawHideForPlayer(playerid,Textdraw6);
               TextDrawHideForPlayer(playerid,Textdraw7);
               TextDrawHideForPlayer(playerid,Textdraw8);
               TextDrawHideForPlayer(playerid,Textdraw9);
               TextDrawHideForPlayer(playerid,Textdraw10);
               TextDrawHideForPlayer(playerid,Textdraw11);
               TextDrawHideForPlayer(playerid,Textdraw12);
               TextDrawHideForPlayer(playerid,Textdraw13);
               TextDrawHideForPlayer(playerid,Textdraw14);
               //========================================
               TextDrawShowForPlayer(playerid,Textdraw15);
               TextDrawShowForPlayer(playerid,Textdraw16);
               TextDrawShowForPlayer(playerid,Textdraw17);
               TextDrawShowForPlayer(playerid,Textdraw18);
               TextDrawShowForPlayer(playerid,Textdraw19);
               TextDrawShowForPlayer(playerid,Textdraw20);
               TextDrawShowForPlayer(playerid,Textdraw21);
               TextDrawShowForPlayer(playerid,Textdraw22);
               TextDrawShowForPlayer(playerid,Textdraw23);
               TextDrawShowForPlayer(playerid,Textdraw24);
               TextDrawShowForPlayer(playerid,Textdraw25);
               TextDrawShowForPlayer(playerid,Textdraw26);
               TextDrawShowForPlayer(playerid,Textdraw131);
               TextDrawShowForPlayer(playerid,Textdraw141);
               PlayerInfo[playerid][pStats3] = 1;
               PlayerInfo[playerid][pStats2] = 0;
               new string7[64];
                 new string8[64];
                 new string9[64];
                 new string10[64];
                 new string11[64];
                 new string12[64];
                 new age = PlayerInfo[targetid][pGodine];
                 new cash =  GetPlayerMoney(targetid);
               new atext[20];
               new pnumber = PlayerInfo[targetid][pPnumber];
               new account = PlayerInfo[targetid][pAccount];
               if(PlayerInfo[targetid][pSpol] == 1) { atext = "Musko"; }
               else if(PlayerInfo[targetid][pSpol] == 2) { atext = "Zensko"; }
                 new otext[20];
               if(PlayerInfo[targetid][pDrzava] == 1) { otext = "Hrvatska"; }
               else if(PlayerInfo[targetid][pDrzava] == 2) { otext = "BiH"; }
               else if(PlayerInfo[targetid][pDrzava] == 3) { otext = "Srbija"; }
               else if(PlayerInfo[targetid][pDrzava] == 4) { otext = "Crna Gora"; }
               else if(PlayerInfo[targetid][pDrzava] == 5) { otext = "Slovenija"; }
               else if(PlayerInfo[targetid][pDrzava] == 6) { otext = "Makedonija"; }
               else if(PlayerInfo[targetid][pDrzava] == 7) { otext = "Ostalo"; }
               PlayerInfo[playerid][pStats3] = 1;
               format(string7, sizeof(string7),"%d",age);
               format(string8, sizeof(string8),"%s",atext);
               format(string9, sizeof(string9),"%s",otext);
               format(string10, sizeof(string10),"%d",pnumber);
               format(string11, sizeof(string11),"%d$",cash);
               format(string12, sizeof(string12),"%d$",account);
               TextDrawSetString(Textdraw21,string7);
               TextDrawSetString(Textdraw23,string8);
               TextDrawSetString(Textdraw22,string9);
               TextDrawSetString(Textdraw24,string10);
               TextDrawSetString(Textdraw25,string11);
               TextDrawSetString(Textdraw26,string12);
               }
      }

public ShowStats3(playerid,targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
   {
               //========================================
               TextDrawHideForPlayer(playerid,Textdraw15);
               TextDrawHideForPlayer(playerid,Textdraw16);
               TextDrawHideForPlayer(playerid,Textdraw17);
               TextDrawHideForPlayer(playerid,Textdraw18);
               TextDrawHideForPlayer(playerid,Textdraw19);
               TextDrawHideForPlayer(playerid,Textdraw20);
               TextDrawHideForPlayer(playerid,Textdraw21);
               TextDrawHideForPlayer(playerid,Textdraw22);
               TextDrawHideForPlayer(playerid,Textdraw23);
               TextDrawHideForPlayer(playerid,Textdraw24);
               TextDrawHideForPlayer(playerid,Textdraw25);
               TextDrawHideForPlayer(playerid,Textdraw26);
               TextDrawHideForPlayer(playerid,Textdraw131);
               TextDrawHideForPlayer(playerid,Textdraw141);
               //==============STR 3=================
               TextDrawShowForPlayer(playerid,Textdraw151);
               TextDrawShowForPlayer(playerid,Textdraw161);
               TextDrawShowForPlayer(playerid,Textdraw171);
               TextDrawShowForPlayer(playerid,Textdraw181);
               TextDrawShowForPlayer(playerid,Textdraw191);
               TextDrawShowForPlayer(playerid,Textdraw221);
               TextDrawShowForPlayer(playerid,Textdraw231);
               TextDrawShowForPlayer(playerid,Textdraw241);
               TextDrawShowForPlayer(playerid,Textdraw251);
               TextDrawShowForPlayer(playerid,Textdraw261);
               TextDrawShowForPlayer(playerid,Textdraw271);
               TextDrawShowForPlayer(playerid,Textdraw281);
               TextDrawShowForPlayer(playerid,BandaMafija);
               TextDrawShowForPlayer(playerid,BandaMafija1);
               PlayerInfo[playerid][pStats2] = 0;
               PlayerInfo[playerid][pStats4] = 1;
               new string12[64];
                 new string13[64];
                 new string14[64];
                 new string15[64];
                 new string16[64];
                 new string17[64];
                    new jtext[20];
                 if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detektiv"; }
                 else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Advokat"; }
                 else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Prostitutka"; }
                 else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Diler droge"; }
                 else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Kradljivac auta"; }
                 else if(PlayerInfo[targetid][pJob] == 6) { jtext = "Novinar"; }
                 else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Automehanicar"; }
                 else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
                 else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Diler oruzija"; }
                 else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Farmer"; }
                 else if(PlayerInfo[targetid][pJob] == 11) { jtext = "Radnik"; }
               else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Bokser"; }
                 else if(PlayerInfo[targetid][pJob] == 14) { jtext = "Vozac busa"; }
                 else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Raznosac novina"; }
                 else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Dostavljac"; }
                 else if(PlayerInfo[targetid][pJob] == 17) { jtext = "Raznosac pice"; }
                 else if(PlayerInfo[targetid][pJob] == 18) { jtext = "Kosac trave"; }
                 else if(PlayerInfo[targetid][pJob] == 19) { jtext = "Farmer droge"; }
                 else if(PlayerInfo[targetid][pJob] == 20) { jtext = "Svercer droge"; }
                 else if(PlayerInfo[targetid][pJob] == 21) { jtext = "Komunalo"; }
                 else if(PlayerInfo[targetid][pJob] == 22) { jtext = "Svercer materijala"; }
                 else if(PlayerInfo[targetid][pJob] == 23) { jtext = "Diler Oruzija"; }
                 else if(PlayerInfo[targetid][pJob] == 25) { jtext = "Postar"; }
                 else if(PlayerInfo[targetid][pJob] == 26) { jtext = "Vlakobodja"; }
                 else if(PlayerInfo[targetid][pJob] == 27) { jtext = "Pilot"; }
                 else { jtext = "Nezaposlen"; }
                 new bmtext[30];
                 if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
               { bmtext = "Yakuza"; }
               else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
               { bmtext = "L.C.N"; }
               else if(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12)
               { bmtext = "T.S.C"; }
               else if(PlayerInfo[targetid][pMember] == 13 || PlayerInfo[targetid][pLeader] == 13)
               { bmtext = "L.S"; }
               else if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 14)
               { bmtext = "N.R"; }
               else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15)
               { bmtext = "G.S.F"; }
               else if(PlayerInfo[targetid][pMember] == 16 || PlayerInfo[targetid][pLeader] == 16)
               { bmtext = "NGR"; }
               else
               { bmtext = "Civil"; }
                   new ftext[30];
                if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)
               { ftext = "L.S.P.D"; }
                 else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)
               { ftext = "F.B.I."; }
               else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)
               { ftext = "S.W.A.T"; }
                 else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
               { ftext = "Hitna Pomoc"; }
               else if(PlayerInfo[targetid][pMember] == 7 || PlayerInfo[targetid][pLeader] == 7)
               { ftext = "Gradonacelnik"; }
               else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)
               { ftext = "Hitman"; }
               else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)
               { ftext = "CNN"; }
               else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)
               { ftext = "Taxi.A."; }
               else if(PlayerInfo[targetid][pMember] == 17 || PlayerInfo[targetid][pLeader] == 17)
               { ftext = "Armija"; }
               else
               { ftext = "Civil"; }
                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 = "PD.Kadet"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "PD.Policajac"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "PD.Narednik"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "PD.Inspektor"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "PD.Porucnik"; }
                    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "PD.Nacelnik"; }
                  else { rtext = "PD.Kadet"; }
               }
               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.Zamjenik"; }
                   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 = " SWAT.Vojnik"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "SWAT.Casnik"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "SWAT Deserter"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "SWAT.General"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "SWAT.Agent"; }
                   else if(PlayerInfo[targetid][pRank] == 6) { rtext = "SWAT.Pukovnik"; }
                  else { rtext = "SWAT.Vojnik"; }
               }
               else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)//MEdic Ranks
               {
                   if(PlayerInfo[targetid][pRank] == 1) { rtext = "MD.Brat"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "MD.Doktro"; }
                  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"; }
               }
               else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)//Yakuza 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)//LCN Ranks
               {
                   if(PlayerInfo[targetid][pRank] == 1) { rtext = "Associate"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Mafioso"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Cappo"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Consigliere"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Don"; }
                    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Godfather"; }
                  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 = "Gradonacelnik"; }
                   else { rtext = "Nema"; }
               }
               else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)//Hitman Ranks
               {
                   if(PlayerInfo[targetid][pRank] == 1) { rtext = "Učenik"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Pomagac"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Ucjenjivac"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Lovac"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Ubojica"; }
                   else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Agent47"; }
                  else { rtext = "Učenik"; }
               }
               else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)//NR Ranks
               {
                   if(PlayerInfo[targetid][pRank] == 1) { rtext = "Novinar"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Starij Novinar"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Reporter"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Web Urednik"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Producent"; }
                   else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Glavni Urednik"; }
                  else { rtext = "Novinar"; }
               }
               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(PlayerInfo[targetid][pMember] == 12 || PlayerInfo[targetid][pLeader] == 12)//Ruska Mafija Rankovi
               {
                   if(PlayerInfo[targetid][pRank] == 1) { rtext = "L.Y.Gangster"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Young Gangster"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "O.Y.Gangster"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "O.Gangster"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "D.O.G"; }
                    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Top O.G"; }
                  else { rtext = "L.Y.Gangster"; }
               }
               else if(PlayerInfo[targetid][pMember] == 13 || PlayerInfo[targetid][pLeader] == 13)//Crips Rankovi
               {
                   if(PlayerInfo[targetid][pRank] == 1) { rtext = "Pocetnk"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Pomagac"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Gangster"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Ubojica"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Zamjenik"; }
                    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Sef"; }
                  else { rtext = "Pocetnik"; }
               }
               else if(PlayerInfo[targetid][pMember] == 14 || PlayerInfo[targetid][pLeader] == 14)//C.R Rankovi
               {
                   if(PlayerInfo[targetid][pRank] == 1) { rtext = "Rockie"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Driver"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Street Driver"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Pro Driver"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Under Boss"; }
                    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Big Boss"; }
                  else { rtext = "Rockie"; }
               }
               else if(PlayerInfo[targetid][pMember] == 15 || PlayerInfo[targetid][pLeader] == 15)//GSFly gang Ranks
               {
                   if(PlayerInfo[targetid][pRank] == 1) { rtext = "Busta"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Homeboy"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Real Memba"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Gangsta"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "O.G"; }
                  else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Top O.G"; }
                  else { rtext = "Busta"; }
               }
               else if(PlayerInfo[targetid][pMember] == 16 || PlayerInfo[targetid][pLeader] == 16)//SRaceri Bikeri 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 Runner"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Thug"; }
                  else if(PlayerInfo[targetid][pRank] == 6) { rtext = "O.G"; }
                  else { rtext = "Dumb Hoe"; }
               }
               else if(PlayerInfo[targetid][pMember] == 17 || PlayerInfo[targetid][pLeader] == 17)//Armija Rankovi
               {
                   if(PlayerInfo[targetid][pRank] == 1) { rtext = "Vojnik"; }
                  else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Skupnik"; }
                  else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Narednik"; }
                  else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Poručnik"; }
                  else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Pukovnik"; }
                  else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
                  else { rtext = "Vojnik"; }
               }
               else
               {
                   rtext = "Nema";
               }
               new drugs = PlayerInfo[targetid][pDrugs];
                 new mats = PlayerInfo[targetid][pMats];
               format(string12, sizeof(string12),"%s",jtext);
               format(string13, sizeof(string13),"%s",rtext);
               format(string14, sizeof(string14),"%s",ftext);
               format(string15, sizeof(string15),"%d",drugs);
               format(string16, sizeof(string16),"%d",mats);
               format(string17, sizeof(string16),"%s",bmtext);
               TextDrawSetString(Textdraw221,string12);
               TextDrawSetString(Textdraw231,string13);
               TextDrawSetString(Textdraw241,string14);
               TextDrawSetString(Textdraw251,string15);
               TextDrawSetString(Textdraw261,string16);
               TextDrawSetString(BandaMafija,string17);
               }
      }

public ShowStats4(playerid,targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
   {
      new housekey = PlayerInfo[targetid][pPhousekey];
      new kills = PlayerInfo[targetid][pKills];
      new deaths = PlayerInfo[targetid][pDeaths];
      new wanted = WantedLevel[targetid];
      new bizkey = PlayerInfo[targetid][pPbiskey];
      new drank[20];
      if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "1"; }
      else if(PlayerInfo[targetid][pDonateRank] == 2) { drank = "2"; }
      else if(PlayerInfo[targetid][pDonateRank] >= 3) { drank = "3"; }
      else { drank = "Nema"; }
      new string18[64];
      new string19[64];
      new string20[64];
      new string21[64];
      new string22[64];
      new string23[64];
      TextDrawHideForPlayer(playerid,Textdraw151);
      TextDrawHideForPlayer(playerid,Textdraw161);
      TextDrawHideForPlayer(playerid,Textdraw171);
      TextDrawHideForPlayer(playerid,Textdraw181);
      TextDrawHideForPlayer(playerid,Textdraw191);
      TextDrawHideForPlayer(playerid,Textdraw221);
      TextDrawHideForPlayer(playerid,Textdraw231);
      TextDrawHideForPlayer(playerid,Textdraw241);
      TextDrawHideForPlayer(playerid,Textdraw251);
      TextDrawHideForPlayer(playerid,Textdraw261);
      TextDrawHideForPlayer(playerid,Textdraw271);
      TextDrawHideForPlayer(playerid,Textdraw281);
      TextDrawHideForPlayer(playerid,BandaMafija);
      TextDrawHideForPlayer(playerid,BandaMafija1);
      //======STRANA 4 ==OSTALO=====
      TextDrawShowForPlayer(playerid,Kuca);
      TextDrawShowForPlayer(playerid,Firma);
      TextDrawShowForPlayer(playerid,Donator);
      TextDrawShowForPlayer(playerid,Ubojstva);
      TextDrawShowForPlayer(playerid,Smrti);
      TextDrawShowForPlayer(playerid,WantedLevel2);
      TextDrawShowForPlayer(playerid,Kuca1);
      TextDrawShowForPlayer(playerid,Firma1);
      TextDrawShowForPlayer(playerid,Donator1);
      TextDrawShowForPlayer(playerid,Ubojstva1);
      TextDrawShowForPlayer(playerid,Smrti1);
      TextDrawShowForPlayer(playerid,WantedLevel1);
      TextDrawShowForPlayer(playerid,BOXOSTALO);
      TextDrawShowForPlayer(playerid,OSTALO);
      PlayerInfo[playerid][pStats3] = 0;
      format(string18, sizeof(string18),"%d",housekey);
      format(string19, sizeof(string19),"%d",bizkey);
      format(string20, sizeof(string20),"%s",drank);
      format(string21, sizeof(string21),"%d",kills);
      format(string22, sizeof(string22),"%d",deaths);
      format(string23, sizeof(string23),"%d",wanted);
      TextDrawSetString(Kuca1,string18);
      TextDrawSetString(Firma1,string19);
      TextDrawSetString(Donator1,string20);
      TextDrawSetString(Ubojstva1,string21);
      TextDrawSetString(Smrti1,string22);
      TextDrawSetString(WantedLevel1,string23);
      }
}

Daj još samo, molim te, postaj i Statsoff funkciju.

Last nick: Paradox

Stavi pod kod ovo ne moze da se prelista . Nepregledno

statsi su ti u textdrawovima koliko vidim, tako da napravi public funkciju gde ces pomerati sve ove textdrawove sa igraca.

Citat: Joey_ poslato Februar 02, 2013, 19:27:32 POSLE PODNE
Daj još samo, molim te, postaj i Statsoff funkciju.
public Statsoff(playerid)
{
            /*TextDrawHideForPlayer(playerid,Textdraw1);
            TextDrawHideForPlayer(playerid,Textdraw2);
            TextDrawHideForPlayer(playerid,Textdraw3);
            TextDrawHideForPlayer(playerid,Textdraw4);
            TextDrawHideForPlayer(playerid,Textdraw5);
            TextDrawHideForPlayer(playerid,Textdraw6);
            TextDrawHideForPlayer(playerid,Textdraw7);
            TextDrawHideForPlayer(playerid,Textdraw8);
            TextDrawHideForPlayer(playerid,Textdraw9);
            TextDrawHideForPlayer(playerid,Textdraw10);
            TextDrawHideForPlayer(playerid,Textdraw11);
            TextDrawHideForPlayer(playerid,Textdraw12);
            TextDrawHideForPlayer(playerid,Textdraw13);
            TextDrawHideForPlayer(playerid,Textdraw14);*/
            TextDrawHideForPlayer(playerid,Textdraw15);
            TextDrawHideForPlayer(playerid,Textdraw16);
            TextDrawHideForPlayer(playerid,Textdraw17);
            TextDrawHideForPlayer(playerid,Textdraw18);
            TextDrawHideForPlayer(playerid,Textdraw19);
            TextDrawHideForPlayer(playerid,Textdraw20);
            TextDrawHideForPlayer(playerid,Textdraw21);
            TextDrawHideForPlayer(playerid,Textdraw22);
            TextDrawHideForPlayer(playerid,Textdraw23);
            TextDrawHideForPlayer(playerid,Textdraw24);
            TextDrawHideForPlayer(playerid,Textdraw25);
            TextDrawHideForPlayer(playerid,Textdraw26);
            TextDrawHideForPlayer(playerid,Textdraw131);
            TextDrawHideForPlayer(playerid,Textdraw141);
            TextDrawHideForPlayer(playerid,Textdraw151);
            TextDrawHideForPlayer(playerid,Textdraw161);
            TextDrawHideForPlayer(playerid,Textdraw171);
            TextDrawHideForPlayer(playerid,Textdraw181);
            TextDrawHideForPlayer(playerid,Textdraw191);
            TextDrawHideForPlayer(playerid,Textdraw221);
            TextDrawHideForPlayer(playerid,Textdraw231);
            TextDrawHideForPlayer(playerid,Textdraw241);
            TextDrawHideForPlayer(playerid,Textdraw251);
            TextDrawHideForPlayer(playerid,Textdraw261);
            TextDrawHideForPlayer(playerid,Textdraw271);
            TextDrawHideForPlayer(playerid,Textdraw281);
            TextDrawHideForPlayer(playerid,BandaMafija);
            TextDrawHideForPlayer(playerid,BandaMafija1);
            TextDrawHideForPlayer(playerid,Kuca);
            TextDrawHideForPlayer(playerid,Firma);
            TextDrawHideForPlayer(playerid,Donator);
            TextDrawHideForPlayer(playerid,Ubojstva);
            TextDrawHideForPlayer(playerid,Smrti);
            TextDrawHideForPlayer(playerid,WantedLevel2);
            TextDrawHideForPlayer(playerid,Kuca1);
            TextDrawHideForPlayer(playerid,Firma1);
            TextDrawHideForPlayer(playerid,Donator1);
            TextDrawHideForPlayer(playerid,Ubojstva1);
            TextDrawHideForPlayer(playerid,Smrti1);
            TextDrawHideForPlayer(playerid,WantedLevel1);
            TextDrawHideForPlayer(playerid,BOXOSTALO);
            TextDrawHideForPlayer(playerid,OSTALO);
            PlayerInfo[playerid][pPrikazaniStatsi] = 0;
            PlayerInfo[playerid][pStats2] = 0;
            PlayerInfo[playerid][pStats3] = 0;
            PlayerInfo[playerid][pStats4] = 0;
            return 1;
}