Telefoni vidljivi u statsu

Započeo Mladjan, Oktobar 20, 2017, 21:55:52 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pozdrav,
Pokusavam da inplementiram opciju za mogucnost posedovanja razlicitih telefona. Npr. mozete kupiti Iphone 8, Samsung S8 uglavnom ne kao da postoji samo jedan telefon. To sam delimicno uradio ali sad ne znam kako da kada igrac ukuca /stats da vidi koji telefon poseduje.
Skripta koju koristim : LCRP
Detaljan opis problema : Ne znam kako da dodam gorenavedeno u stats.
Deo skripte :
      new string[256], iskustvo; iskustvo = (PlayerInfo[playerid][pLevel] * 2) + 2;
new auto1[3], motor[3], bicikla[3], letelica[3], plovilo[3], kuca[3], stan[3], vikendica[3], firma[3], mobilni[3],
               pol[7], kredit[3];
               if(PlayerInfo[playerid][pPreostaloZaOtplatu] == 0) kredit = "Ne";
               else if(PlayerInfo[playerid][pPreostaloZaOtplatu] > 0) kredit = "Da";
        if(PlayerInfo[playerid][pSex] == 1) pol = "Musko";
else if(PlayerInfo[playerid][pSex] == 2) pol = "Zensko";
               if(PlayerInfo[playerid][pMobilni] == 0) mobilni = "Ne";
else if(PlayerInfo[playerid][pMobilni] != 0) mobilni = "Da";
if(PlayerInfo[playerid][pPosedovanjeAuta] == -1) auto1 = "Ne";
else if(PlayerInfo[playerid][pPosedovanjeAuta] != -1) auto1 = "Da";
if(PlayerInfo[playerid][pPosedovanjeMotora] == -1) motor = "Ne";
else if(PlayerInfo[playerid][pPosedovanjeMotora] != -1) motor = "Da";
if(PlayerInfo[playerid][pPosedovanjeBicikla] == -1) bicikla = "Ne";
else if(PlayerInfo[playerid][pPosedovanjeBicikla] != -1) bicikla = "Da";
if(PlayerInfo[playerid][pPosedovanjeAviona] == -1) letelica = "Ne";
else if(PlayerInfo[playerid][pPosedovanjeAviona] != -1) letelica = "Da";
if(PlayerInfo[playerid][pPosedovanjePlovila] == -1) plovilo = "Ne";
else if(PlayerInfo[playerid][pPosedovanjePlovila] != -1) plovilo = "Da";
if(PlayerInfo[playerid][pPosedovanjeKuce] == -1) kuca = "Ne";
else if(PlayerInfo[playerid][pPosedovanjeKuce] != -1) kuca = "Da";
if(PlayerInfo[playerid][pPosedovanjeStana] == -1) stan = "Ne";
else if(PlayerInfo[playerid][pPosedovanjeStana] != -1) stan = "Da";
if(PlayerInfo[playerid][pPosedovanjeVikendice] == -1) vikendica = "Ne";
else if(PlayerInfo[playerid][pPosedovanjeVikendice] != -1) vikendica = "Da";
if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) firma = "Ne";
else if(PlayerInfo[playerid][pPosedovanjeFirme] != -1) firma = "Da";
for(new i = 0; i < 37; i++) PlayerTextDrawShow(playerid, UPSTATS[i][playerid]);
KreiranStats[playerid] = 1; SCM(playerid,-1,"[BP:RP] "CRVENA"Da zatvorite stats kucajte ponovo '/stats'!");
format(string, sizeof(string),"%s",GetName(playerid));
PlayerTextDrawSetString(playerid,UPSTATS[3][playerid], string);
format(string, sizeof(string),"~y~Posao ugovor: ~w~%d",PlayerInfo[playerid][pPosaoUgovor]);
PlayerTextDrawSetString(playerid,UPSTATS[4][playerid], string);
                format(string, sizeof(string),"~y~Novac: ~g~%d$",PlayerInfo[playerid][pNovacDzep]);
PlayerTextDrawSetString(playerid,UPSTATS[5][playerid], string);
format(string, sizeof(string),"~y~Auto: ~w~%s",auto1);
PlayerTextDrawSetString(playerid,UPSTATS[6][playerid], string);
format(string, sizeof(string),"~y~Motor: ~w~%s",motor);
PlayerTextDrawSetString(playerid,UPSTATS[7][playerid], string);
format(string, sizeof(string),"~y~Respekti: ~w~%d/%d",PlayerInfo[playerid][pExp], iskustvo);
PlayerTextDrawSetString(playerid,UPSTATS[12][playerid], string);
                format(string, sizeof(string),"~y~Level: ~w~%d",PlayerInfo[playerid][pLevel]);
PlayerTextDrawSetString(playerid,UPSTATS[13][playerid], string);
                format(string, sizeof(string),"%s",PosaoIme(PlayerInfo[playerid][pPosao]));
PlayerTextDrawSetString(playerid,UPSTATS[10][playerid], string);
format(string, sizeof(string),"%s",ImeOrganizacije(PlayerInfo[playerid][pClan]));
PlayerTextDrawSetString(playerid,UPSTATS[14][playerid], string);
format(string, sizeof(string),"~y~Plovilo: ~w~%s",plovilo);
PlayerTextDrawSetString(playerid,UPSTATS[15][playerid], string);
format(string, sizeof(string),"~y~Rank org: ~w~%d",PlayerInfo[playerid][pRank]);
PlayerTextDrawSetString(playerid,UPSTATS[16][playerid], string);
format(string, sizeof(string),"~y~Sati igre: ~w~%d",PlayerInfo[playerid][pSatiIgre]);
PlayerTextDrawSetString(playerid,UPSTATS[17][playerid], string);
format(string, sizeof(string),"~y~Org kazna: ~w~%d",PlayerInfo[playerid][pOrgUgovor]);
PlayerTextDrawSetString(playerid,UPSTATS[18][playerid], string);
format(string, sizeof(string),"~y~Warn: ~w~%d/5",PlayerInfo[playerid][pWarn]);
PlayerTextDrawSetString(playerid,UPSTATS[19][playerid], string);
    format(string, sizeof(string),"~y~Banka: ~g~%d$",PlayerInfo[playerid][pNovacBanka]);
PlayerTextDrawSetString(playerid,UPSTATS[20][playerid], string);
format(string, sizeof(string),"~y~Kuca: ~w~%s",kuca);
PlayerTextDrawSetString(playerid,UPSTATS[21][playerid], string);
format(string, sizeof(string),"~y~Biciklo: ~w~%s",bicikla);
PlayerTextDrawSetString(playerid,UPSTATS[22][playerid], string);
                format(string, sizeof(string),"~y~Vikendica: ~w~%s",vikendica);
PlayerTextDrawSetString(playerid,UPSTATS[23][playerid], string);
                format(string, sizeof(string),"~y~letelica: ~w~%s",letelica);
PlayerTextDrawSetString(playerid,UPSTATS[24][playerid], string);
format(string, sizeof(string),"~y~Firma: ~w~%s",firma);
PlayerTextDrawSetString(playerid,UPSTATS[25][playerid], string);
format(string, sizeof(string),"~y~Stan: ~w~%s",stan);
PlayerTextDrawSetString(playerid,UPSTATS[26][playerid], string);
format(string, sizeof(string),"~y~Mobilni: ~w~%s",mobilni);
PlayerTextDrawSetString(playerid,UPSTATS[27][playerid], string);
                format(string, sizeof(string),"~y~Droga: ~w~%dg",PlayerInfo[playerid][pDroga]);
PlayerTextDrawSetString(playerid,UPSTATS[29][playerid], string);
format(string, sizeof(string),"~y~Mats: ~w~%d",PlayerInfo[playerid][pMats]);
PlayerTextDrawSetString(playerid,UPSTATS[30][playerid], string);
format(string, sizeof(string),"~y~Godine: ~w~%d",PlayerInfo[playerid][pGodine]);
PlayerTextDrawSetString(playerid,UPSTATS[31][playerid], string);
                format(string, sizeof(string),"~y~Pol: ~w~%s",pol);
PlayerTextDrawSetString(playerid,UPSTATS[32][playerid], string);
format(string, sizeof(string),"~y~Wanted: ~w~%d",GetPlayerWantedLevel(playerid));
PlayerTextDrawSetString(playerid,UPSTATS[33][playerid], string);
format(string, sizeof(string),"~y~Kredit: ~w~%s",kredit);
PlayerTextDrawSetString(playerid,UPSTATS[34][playerid], string);
format(string, sizeof(string),"~y~Mob kredit: ~w~%d",PlayerInfo[playerid][pMobKredit]);
PlayerTextDrawSetString(playerid,UPSTATS[35][playerid], string);
format(string, sizeof(string),"~y~Uhapsen Puta: ~w~%d",PlayerInfo[playerid][pUhapsenPuta]);
PlayerTextDrawSetString(playerid,UPSTATS[36][playerid], string);


-U ovom gore kodu zelim da dodam npr. marka mobilnog medjutim ne znam kako.
-Molim Vas POMOZITE!

Pokušaj ovako, pa prilagodi sebi:

[pawn]MobileName( playerid ) {
   new acn[128] = "Nemate mobilni";
        if( PlayerInfo[ playerid ][ pMobile ] == 0 ) format(acn, sizeof(acn), "Nemate mobilni");
   else if( PlayerInfo[ playerid ][ pMobile ] == 1 ) format(acn, sizeof(acn), "iPhone 8");
   else if( PlayerInfo[ playerid ][ pMobile ] == 2 ) format(acn, sizeof(acn), "Samsung S8");
   else if( PlayerInfo[ playerid ][ pMobile ] == 3 ) format(acn, sizeof(acn), "iPhone X");
   return acn;
}[/pawn]