How i can link two formats?
#1

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?
Reply
#2

strcat. 8chars
Reply
#3

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.
Reply
#4

hm i dont get it what are you trying to say, can you just give me example?
Reply
#5

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]);
Reply
#6

lol why, you make 2 strings and on TextDrawSetString you put "string", result of this will be: blank screen xd
Reply
#7

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??
Reply
#8

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]);
Reply
#9

Ok thank you Grim and ***** it work now fine
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)