[pomoc] stats

Započeo sampzone, Jun 22, 2011, 00:09:19 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

mod koji ja korisitm: BU  = BSZ

problem: imam stats u textdraw ali sad hocu da prebacim u dijalog i neide nikako nerazumijem onaj coordsstring  evo dacu vam ja svoj stats mozel meno da mi prebaci u sendcilentmessage a ja cu nekako u dijalog pls...?

dio skripte: evo vam stats:
/*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 kreditbr = PlayerInfo[targetid][pKredit];
//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 warns = PlayerInfo[targetid][pWarns];
//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_GRAD6,"Za Admine:");
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);

//STATS
//STATS TEXTDRAWS
format(coordsstring, sizeof(coordsstring),"~y~Ime:~h~~h~ %s",name);
Textdraw0[playerid] = TextDrawCreate(150.000000, 341.000000, coordsstring);
TextDrawBackgroundColor(Textdraw0[playerid], 255);
TextDrawFont(Textdraw0[playerid], 1);
TextDrawLetterSize(Textdraw0[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw0[playerid], -1);
TextDrawSetOutline(Textdraw0[playerid], 0);
TextDrawSetProportional(Textdraw0[playerid], 1);
TextDrawSetShadow(Textdraw0[playerid], 1);

format(coordsstring, sizeof(coordsstring),"~y~Pol:~h~~h~ %s",atext);
Textdraw1[playerid] = TextDrawCreate(151.000000, 361.000000, coordsstring);
TextDrawBackgroundColor(Textdraw1[playerid], 255);
TextDrawFont(Textdraw1[playerid], 1);
TextDrawLetterSize(Textdraw1[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw1[playerid], -1);
TextDrawSetOutline(Textdraw1[playerid], 0);
TextDrawSetProportional(Textdraw1[playerid], 1);
TextDrawSetShadow(Textdraw1[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Godine:~h~~h~ %d",age);
Textdraw2[playerid] = TextDrawCreate(151.000000, 381.000000,coordsstring);
TextDrawBackgroundColor(Textdraw2[playerid], 255);
TextDrawFont(Textdraw2[playerid], 1);
TextDrawLetterSize(Textdraw2[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw2[playerid], -1);
TextDrawSetOutline(Textdraw2[playerid], 0);
TextDrawSetProportional(Textdraw2[playerid], 1);
TextDrawSetShadow(Textdraw2[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Level:~h~~h~ %d",level);
Textdraw3[playerid] = TextDrawCreate(151.000000, 401.000000,coordsstring);
TextDrawBackgroundColor(Textdraw3[playerid], 255);
TextDrawFont(Textdraw3[playerid], 1);
TextDrawLetterSize(Textdraw3[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw3[playerid], -1);
TextDrawSetOutline(Textdraw3[playerid], 0);
TextDrawSetProportional(Textdraw3[playerid], 1);
TextDrawSetShadow(Textdraw3[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Respekt:~h~~h~ %d/%d",exp,expamount);
Textdraw4[playerid] = TextDrawCreate(151.000000, 421.000000,coordsstring);
TextDrawBackgroundColor(Textdraw4[playerid], 255);
TextDrawFont(Textdraw4[playerid], 1);
TextDrawLetterSize(Textdraw4[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw4[playerid], -1);
TextDrawSetOutline(Textdraw4[playerid], 0);
TextDrawSetProportional(Textdraw4[playerid], 1);
TextDrawSetShadow(Textdraw4[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Warns:~h~~h~ %d/5",warns);
Textdraw5[playerid] = TextDrawCreate(310.000000, 341.000000,coordsstring);
TextDrawBackgroundColor(Textdraw5[playerid], 255);
TextDrawFont(Textdraw5[playerid], 1);
TextDrawLetterSize(Textdraw5[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw5[playerid], -1);
TextDrawSetOutline(Textdraw5[playerid], 0);
TextDrawSetProportional(Textdraw5[playerid], 1);
TextDrawSetShadow(Textdraw5[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~O.Sati:~h~~h~ %d",ptime);
Textdraw6[playerid] = TextDrawCreate(310.000000, 361.000000,coordsstring);
TextDrawBackgroundColor(Textdraw6[playerid], 255);
TextDrawFont(Textdraw6[playerid], 1);
TextDrawLetterSize(Textdraw6[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw6[playerid], -1);
TextDrawSetOutline(Textdraw6[playerid], 0);
TextDrawSetProportional(Textdraw6[playerid], 1);
TextDrawSetShadow(Textdraw6[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Kredit:~h~~h~ %d",kreditbr);
Textdraw7[playerid] = TextDrawCreate(310.000000, 381.000000,coordsstring);
TextDrawBackgroundColor(Textdraw7[playerid], 255);
TextDrawFont(Textdraw7[playerid], 1);
TextDrawLetterSize(Textdraw7[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw7[playerid], -1);
TextDrawSetOutline(Textdraw7[playerid], 0);
TextDrawSetProportional(Textdraw7[playerid], 1);
TextDrawSetShadow(Textdraw7[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Donator:~h~~h~ %s",drank);
Textdraw8[playerid] = TextDrawCreate(310.000000, 401.000000,coordsstring);
TextDrawBackgroundColor(Textdraw8[playerid], 255);
TextDrawFont(Textdraw8[playerid], 1);
TextDrawLetterSize(Textdraw8[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw8[playerid], -1);
TextDrawSetOutline(Textdraw8[playerid], 0);
TextDrawSetProportional(Textdraw8[playerid], 1);
TextDrawSetShadow(Textdraw8[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Broj:~h~~h~ %d",pnumber);
Textdraw9[playerid] = TextDrawCreate(310.000000, 421.000000,coordsstring);
TextDrawBackgroundColor(Textdraw9[playerid], 255);
TextDrawFont(Textdraw9[playerid], 1);
TextDrawLetterSize(Textdraw9[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw9[playerid], -1);
TextDrawSetOutline(Textdraw9[playerid], 0);
TextDrawSetProportional(Textdraw9[playerid], 1);
TextDrawSetShadow(Textdraw9[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Posao:~h~~h~ %s",jtext);
Textdraw10[playerid] = TextDrawCreate(470.000000, 341.000000,coordsstring);
TextDrawBackgroundColor(Textdraw10[playerid], 255);
TextDrawFont(Textdraw10[playerid], 1);
TextDrawLetterSize(Textdraw10[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw10[playerid], -1);
TextDrawSetOutline(Textdraw10[playerid], 0);
TextDrawSetProportional(Textdraw10[playerid], 1);
TextDrawSetShadow(Textdraw10[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Org:~h~~h~ %s",ftext);
Textdraw11[playerid] = TextDrawCreate(470.000000, 361.000000,coordsstring);
TextDrawBackgroundColor(Textdraw11[playerid], 255);
TextDrawFont(Textdraw11[playerid], 1);
TextDrawLetterSize(Textdraw11[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw11[playerid], -1);
TextDrawSetOutline(Textdraw11[playerid], 0);
TextDrawSetProportional(Textdraw11[playerid], 1);
TextDrawSetShadow(Textdraw11[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Rank:~h~~h~ %s",rtext);
Textdraw12[playerid] = TextDrawCreate(470.000000, 381.000000,coordsstring);
TextDrawBackgroundColor(Textdraw12[playerid], 255);
TextDrawFont(Textdraw12[playerid], 1);
TextDrawLetterSize(Textdraw12[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw12[playerid], -1);
TextDrawSetOutline(Textdraw12[playerid], 0);
TextDrawSetProportional(Textdraw12[playerid], 1);
TextDrawSetShadow(Textdraw12[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Droga:~h~~h~ %d",drugs);
Textdraw13[playerid] = TextDrawCreate(470.000000, 401.000000,coordsstring);
TextDrawBackgroundColor(Textdraw13[playerid], 255);
TextDrawFont(Textdraw13[playerid], 1);
TextDrawLetterSize(Textdraw13[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw13[playerid], -1);
TextDrawSetOutline(Textdraw13[playerid], 0);
TextDrawSetProportional(Textdraw13[playerid], 1);
TextDrawSetShadow(Textdraw13[playerid], 1);

    format(coordsstring, sizeof(coordsstring),"~y~Mats:~h~~h~ %d",mats);
Textdraw14[playerid] = TextDrawCreate(470.000000, 421.000000,coordsstring);
TextDrawBackgroundColor(Textdraw14[playerid], 255);
TextDrawFont(Textdraw14[playerid], 1);
TextDrawLetterSize(Textdraw14[playerid], 0.500000, 1.000000);
TextDrawColor(Textdraw14[playerid], -1);
TextDrawSetOutline(Textdraw14[playerid], 0);
TextDrawSetProportional(Textdraw14[playerid], 1);
TextDrawSetShadow(Textdraw14[playerid], 1);


slike:/

Hvala za pomoc unaprijed!

Evo ti..ovo sam izvukao iz jednog moda samo sam dosta kod sebe izmijenio pa evo mijenjaj i ti :D

       new age = PlayerInfo[targetid][pAge];
new ptime = PlayerInfo[targetid][pConnectTime];
new deaths = PlayerInfo[targetid][pDeaths];
new crimes = PlayerInfo[targetid][pCrimes];
  new arrests = PlayerInfo[targetid][pArrested];
new drugs = PlayerInfo[targetid][pDrugs];
new mats = PlayerInfo[targetid][pMats];
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 donator = PlayerInfo[targetid][pDonator];
new kredit = PlayerInfo[targetid][pKredit];
new igra = PlayerInfo[playerid][pPayCheck]/225;
new bon = PlayerInfo[targetid][pMobileBon];
new nxtlevel = PlayerInfo[targetid][pLevel]+1;
new expamount = nxtlevel*levelexp;
/*new costlevel = nxtlevel*levelcost;//10k for testing purposes*/
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[2048],coordsstringA[256],coordsstringB[256],coordsstringC[256],coordsstringD[256],coordsstringE[256];
    format(coordsstringA, sizeof(coordsstringA), "{00CCFF}Ime:[%s] \n{00CCFF}Level:[%d] \n{FFFF00}Spol:[%s] \n{00CCFF}Starost:[%d] \n{FFFF00}Drzava:[%s]\n\n  Novaca:[$%d]\n{00CCFF}Bank:[$%d] \n{FFFF00}Br. moba:[%d]", name, level, atext, age, otext, cash, account, pnumber);
format(coordsstringB, sizeof(coordsstringB), "\n\n{00CCFF}Donator Bodova:[%d] \n{FFFF00}Bracno stanje:[%s] \n{00CCFF}Sati igranja:[%d] \n{FFFF00}PayDay:[%d/30]", donator,married,ptime,igra);
format(coordsstringC, sizeof(coordsstringC), "\n\n{00CCFF}Pocinjeni zlocini:[%d] \n{FFFF00}Vrijeme u zatvoru:[%d] \n{00CCFF}Posao:[%s] \n{FFFF00}Mobitel Bon:[%d] ", crimes,arrests,jtext,bon);
       format(coordsstringD, sizeof(coordsstringD), "\n\n{00CCFF}Ubojstva:[%d] \n{FFFF00}Smrti:[%d] \n{00CCFF}Respect:[%d/%d] \n{FFFF00}Obitelj:[%s] \n{00CCFF}Kredit iznos: [%d]",kills,deaths,exp,expamount,f2text,kredit);
format(coordsstringE, sizeof(coordsstringE), "\n\n{00CCFF}Droge:[%d] \n{FFFF00}Materijali:[%d] \n{00CCFF}Bolest:[%s] \n{FFFF00}Organizacija:[%s] \n{00CCFF}Rank:[%s]",drugs,mats,dtext,ttext,rtext);
   format(coordsstring, sizeof(coordsstring), "%s\n%s\n%s\n%s\n%s",coordsstringA,coordsstringB,coordsstringC,coordsstringD,coordsstringE);
   ShowPlayerDialog(playerid,842,DIALOG_STYLE_MSGBOX,"|----------|{FF0000}Zivot Igraca|----------|{3300FF}Stats|----------||----------| Zivot Igraca|----------|Stats|----------||----------| Zivot Igraca|----------|Stats|----------||----------| Zivot Igraca|----------|Stats|----------|",coordsstring,"OK","Odustani");

}
}



trebalo bi pomoci ;)
Poslednja Izmena: Jun 22, 2011, 07:54:06 PRE PODNE od Gunnarson

imao sam i ja ovo ali ja nerazumijem  ovaj coordsstringA npr jel sad pod coordsstringA mogu da stavim sta god hocu?

da mozes samo vidi da ti se negdje ne ponavlja..mozes staviti coorsstring8r itd..:D

tnx ovdje moze lock....uredjeno