Problem sa stats


Započeo kim3205, Februar 09, 2018, 05:10:02 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Citat: Paul Castellano poslato Februar 10, 2018, 19:29:54 POSLE PODNE
stock ImeOrganizacije(factionid)
{
    new string[30];
    switch(factionid)
	{
    	case 7: string = "La Cosa Nostra";
        case 6: string = "Los Santos Novinari";
    	case 5: string = "Ballas";
        case 4: string = "Grove Street Family";
        case 3: string = "Black Dragon Triads";
        case 2: string = "Mexican Mafia";
        case 1: string = "Los Santos Police Department";
        case 0: string = "Nijedna";
        default: string = "Nijedna";
    }
    return string;
}

(Prilagodi sebi)
Dodaj tako neÅ¡to i onda samo koristiÅ¡ "%s",ImeOrganizacije(PlayerInfo[targetid][xClan])  ,umjesto "clan" kako si definirao.Isto tako i za posao kako sam ti gore rekao i neće biti problema.

Ali dinamicno kreiranje imam na gmu

i am king!


Citat: .ксундер poslato Februar 10, 2018, 20:10:14 POSLE PODNE
Pa getaj ime iz arraya organizacija ...

Dinamicno kreiranje ne kontam kako da ubacim, dal vrste org-e ali imena org ne ?

i am king!

Koliko vidim koristis Athlone mod tkd. imas funkciju vec za getanje org imena.
Ovaj kod koristi umesto ovoga rank sto trenutno koristis jer rank je nesto drugo a ne ime orge.

getOrgName( PlayerInfo[ targetid ][ xClan ] )
HARD WORK BEATS TALENT

Tipa ako imas

enum e_org {
tiporg,
imeorg[50] }; new Organzacije[max_org][e_org];

onda getas
Organizacije[PlayerInfo[playerid][Clan]][imeorg]; 

ili ako imas
new imeorg[max_org][50];

getas
imeorg[PlayerInfo[playerid][Clan]]



Evo kako je kad kucam /stats kao nepostojeca CMD


forward PrikazStats(playerid,targetid);
public PrikazStats(playerid,targetid)
{
    new cash = GetPlayerMoney(targetid);
    new otext[20];
    if(PlayerInfo[targetid][xDrzava] == 1) { otext = "Makedonija"; }
    else if(PlayerInfo[targetid][xDrzava] == 2) { otext = "Hrvatska"; }
    else if(PlayerInfo[targetid][xDrzava] == 3) { otext = "Srbija"; }
    else if(PlayerInfo[targetid][xDrzava] == 4) { otext = "Crna Gora"; }
    else if(PlayerInfo[targetid][xDrzava] == 5) { otext = "BiH"; }
    else if(PlayerInfo[targetid][xDrzava] == 6) { otext = "Ostalo"; }
    new ktext[50];
    if(PlayerInfo[ targetid ][ xProperty ][ 0 ] != 1) { ktext = "NE"; }
    else if(PlayerInfo [ targetid ] [ xProperty ] [ 0 ] != -1) { ktext = "DA"; }

    new atext[20];
    if(PlayerInfo[targetid][xPol] == 1) { atext = "Musko"; }
    else if(PlayerInfo[targetid][xPol] == 2) { atext = "Zensko"; }

    new age = PlayerInfo[targetid][xGodine];
    new dp = PlayerInfo[targetid][xDP];
    new points = PlayerInfo[targetid][xRPPoen];
    new rank = PlayerInfo[targetid][xRank];
    new clan = PlayerInfo[targetid][xClan];
    new ptime = PlayerInfo[targetid][xOnlineSati];
    new drugs = PlayerInfo[targetid][xDrug];
    new level = PlayerInfo[targetid][xLevel];
    new vozilo1 = PlayerInfo[targetid][xVoziloID][ 0 ];
    new vozilo2 = PlayerInfo[targetid][xVoziloID][ 1 ];
    new vozilo3 = PlayerInfo[targetid][xVoziloID][ 2 ];
    new vozilo4 = PlayerInfo[targetid][xVoziloID][ 3 ];
    new mats = PlayerInfo[targetid][xMaterijali];
    new zlt = PlayerInfo[targetid][xZlato];
    new g = PlayerInfo[targetid][xGSef];
    new exp = PlayerInfo[targetid][xRespekt];
    new tkp = PlayerInfo[targetid][xTK];
    new energ = PlayerInfo[targetid][xEnergy];
    new pnumber = PlayerInfo[targetid][xBrojTelefona];
    new account = PlayerInfo[targetid][xBRacun];
    new nxtlevel = PlayerInfo[targetid][xLevel]+1;
    new kuca1 = PlayerInfo[ targetid ][ xProperty ][ 0 ];
    new kuca2 = PlayerInfo[ targetid ][ xProperty ][ 1 ];
    new kuca3 = PlayerInfo[ targetid ][ xProperty ][ 2 ];
    new expamount = nxtlevel*exp;
    new bizkey = PlayerInfo[targetid][xFirmaID];
    new akcije = PlayerInfo[targetid][xAkcija];
    new zpolu = PlayerInfo[targetid][xZPoluge];
    new spolu = PlayerInfo[targetid][xSPoluge];
    new dmd = PlayerInfo[targetid][xDmd];
    //new bulevar1 = PlayerInfo[targetid][xKljucBulevara];
    //new ozenjen = PlayerInfo[targetid][xMarriedTo];
    new God, Mes, Dan;
    getdate(God, Mes, Dan);
    new Float:health;
    new name[MAX_PLAYER_NAME];
    GetPlayerName(targetid, name, sizeof(name));
    GetPlayerHealth(targetid,health);
    new Float:px,Float:py,Float:pz;// plav {80C8FE}
    GetPlayerPos(targetid, px, py, pz); //  nara{FF6600}
    new coordsstring1[400];
    new coordsstring2[400];
    new coordsstring3[400];
    new coordsstring4[400];
	new coordsstring5[400];
    new stats[1800];// ispis statsa
    format(coordsstring1, sizeof(coordsstring1),"{80c8fe}Ime i Prezime:{FFFFFF}%s\n{ef0000}Osnovni Podaci\n{80c8fe}Level:{FFFFFF}%d\n{80c8fe}Respekti:{FFFFFF}%d/%d\n{80c8fe}Sati Igranja:{FFFFFF}%d\n{80c8fe}Broj Telefona:{FFFFFF}%d",name,level,exp,expamount,ptime,pnumber);
    format(coordsstring2, sizeof(coordsstring2),"\n{ef0000}Banka\n{FFFFFF}Akcije: %d DMD:%d ZP:%d SP:%d\nDzep:%d Banka:%d\nGold:%d Gsef:%d\nTiketi:uskoro Racuni:uskoro\n{ef0000}Licna Karta{FFFFFF}\nPol:%s Godina:%d Zlocin:uskoro Uhapsio:uskoro",akcije,dmd,zpolu,spolu,cash,account,zlt,g,atext,age);
    format(coordsstring3, sizeof(coordsstring3),"\n{FFFFFF}Zatvor:none Mutiran: none Posao: %s \nOrganizacija: %s Rank: %d Brak:Nije Kum:Niko\nBanovan:0 Karma: 0 HpPoints:%d TK:%d",getJobName( PlayerInfo[ targetid ][ xPosao ] ),getOrgName( PlayerInfo[ targetid ][ xClan ] ),rank,points,tkp);
    format(coordsstring4, sizeof(coordsstring4),"\n{ef0000}Torba{FFFFFF}\nDroga:%d Energy:%d \nMats:%d Gorivo:0 Sladoled:0 MB: 0\nPotkovice:0 GPS:1 GMF:0 DP:0\nCipovi:0\n{ef0000}Kljucevi\nKuca1:%d Kuca2:%d Kuca3:%d Biz:%d",drugs,energ,mats,dp,kuca1,kuca2,kuca3,bizkey);
    format(coordsstring5, sizeof(coordsstring5),"\n{FFFFFF}Vozilo1: %d Vozilo2: %d Vozilo3: %d Vozilo4: %d\nUkupno slotova za vozila: 4\nBL:{00c000} Nema",vozilo1,vozilo2,vozilo3,vozilo4);
	format(stats, sizeof(stats),"%s%s%s%s%s",coordsstring1,coordsstring2,coordsstring3,coordsstring4,coordsstring5);
    ShowPlayerDialog(playerid, sizeof(stats), DIALOG_STYLE_MSGBOX, "{FF0000}BlackMoney {FFFFFF}Licna Karta", stats , "Uredu", "Otkazi");
}

i am king!


Citat: .ксундер poslato Februar 11, 2018, 02:07:28 PRE PODNE
Tipa ako imas

enum e_org {
tiporg,
imeorg[50] }; new Organzacije[max_org][e_org];

onda getas
Organizacije[PlayerInfo[playerid][Clan]][imeorg]; 

ili ako imas
new imeorg[max_org][50];

getas
imeorg[PlayerInfo[playerid][Clan]]


probao sam isti problem ispisuje nepostojeca CMD i nece da mi otvori stats


Citat: MrToretto poslato Februar 11, 2018, 00:12:49 PRE PODNE
Koliko vidim koristis Athlone mod tkd. imas funkciju vec za getanje org imena.
Ovaj kod koristi umesto ovoga rank sto trenutno koristis jer rank je nesto drugo a ne ime orge.

getOrgName( PlayerInfo[ targetid ][ xClan ] )


Nece, kad postavim to onda mi ispisuje kao nepostojeca CMD takodje i za org.
Poslednja Izmena: Februar 13, 2018, 23:26:23 POSLE PODNE od ★ Pɪɴᴋɪ ★

i am king!

Citat: â˜... Pɪɴᴋɪ â˜... poslato Februar 13, 2018, 23:24:03 POSLE PODNE
probao sam isti problem ispisuje nepostojeca CMD i nece da mi otvori stats


Nece, kad postavim to onda mi ispisuje kao nepostojeca CMD takodje i za org.

Debugaj.




FINISH .ксундер !
LOCK

i am king!