How i can link two formats? -
[H]265 - 16.11.2010
example:
pawn Код:
format(string, sizeof string,"Ime: ~g~%s~n~~w~Level: ~g~%d~n~~w~Novac: ~g~%d$~n~~w~Banka: ~g~%d$~n~~w~Placa: ~g~%d$~n~~w~Kickan: ~g~%d",GetName(playerid2),level,novac,banka,placa,kickan);
format(string, sizeof string,"~n~~w~Droga: ~g~%d~n~~w~Posao: ~g~%s~n~~w~Organizacija: ~g~%s~n~~w~Donator: ~g~%d/3~n~~w~Opomena: ~g~%d",droga,textp,texto,donator,opomena);
TextDrawSetString(Text:Stats7[playerid2], string);
TextDrawShowForPlayer(playerid2, Text:Stats7[playerid2]);
How i can linked this two string?
Re: How i can link two formats? -
The_Moddler - 16.11.2010
strcat. 8chars
Re: How i can link two formats? -
Grim_ - 16.11.2010
Why not format them all at once?
And you could just use three different arrays, and format the third with the two other formatted ones.
// Or strcat.
This forum requires that you wait 120 seconds between posts. Please try again in 63 seconds.
Re: How i can link two formats? -
[H]265 - 16.11.2010
hm i dont get it what are you trying to say, can you just give me example?
Re: How i can link two formats? -
zSuYaNw - 16.11.2010
pawn Код:
new STR1[128];
new STR2[128];
format(STR1, sizeof STR1,"Ime: ~g~%s~n~~w~Level: ~g~%d~n~~w~Novac: ~g~%d$~n~~w~Banka: ~g~%d$~n~~w~Placa: ~g~%d$~n~~w~Kickan: ~g~%d",GetName(playerid2),level,novac,banka,placa,kickan);
format(STR2, sizeof STR2,"~n~~w~Droga: ~g~%d~n~~w~Posao: ~g~%s~n~~w~Organizacija: ~g~%s~n~~w~Donator: ~g~%d/3~n~~w~Opomena: ~g~%d",droga,textp,texto,donator,opomena);
TextDrawSetString(Text:Stats7[playerid2], string);
TextDrawShowForPlayer(playerid2, Text:Stats7[playerid2]);
Re: How i can link two formats? -
[H]265 - 16.11.2010
lol why, you make 2 strings and on TextDrawSetString you put "string", result of this will be: blank screen xd
Re: How i can link two formats? -
The_Moddler - 16.11.2010
Quote:
Originally Posted by [Full]Garfield[XDB]
pawn Код:
new STR1[128]; new STR2[128];
format(STR1, sizeof STR1,"Ime: ~g~%s~n~~w~Level: ~g~%d~n~~w~Novac: ~g~%d$~n~~w~Banka: ~g~%d$~n~~w~Placa: ~g~%d$~n~~w~Kickan: ~g~%d",GetName(playerid2),level,novac,banka,placa,kickan); format(STR2, sizeof STR2,"~n~~w~Droga: ~g~%d~n~~w~Posao: ~g~%s~n~~w~Organizacija: ~g~%s~n~~w~Donator: ~g~%d/3~n~~w~Opomena: ~g~%d",droga,textp,texto,donator,opomena); TextDrawSetString(Text:Stats7[playerid2], string); TextDrawShowForPlayer(playerid2, Text:Stats7[playerid2]);
|
WTF is this??
Re: How i can link two formats? -
[H]265 - 16.11.2010
Maybe something like this?
pawn Код:
format(string, sizeof string,"%s~n~~w~Ime: ~g~%s~n~~w~Level: ~g~%d~n~~w~Novac: ~g~%d$~n~~w~Banka: ~g~%d$~n~~w~Placa: ~g~%d$~n~~w~Kickan: ~g~%d",string,GetName(playerid2),level,novac,banka,placa,kickan);
format(string, sizeof string,"%s~n~~w~Droga: ~g~%d~n~~w~Posao: ~g~%s~n~~w~Organizacija: ~g~%s~n~~w~Donator: ~g~%d/3~n~~w~Opomena: ~g~%d",string,droga,textp,texto,donator,opomena);
TextDrawSetString(Text:Stats7[playerid2], string);
TextDrawShowForPlayer(playerid2, Text:Stats7[playerid2]);
Re: How i can link two formats? -
[H]265 - 16.11.2010
Ok thank you Grim and ***** it work now fine