string in txt
#1

Hey, im making string for bank money, so i want that string is full, and as u can see, i want if player have have 1250 then in text draw will be 00001250, but i dont know how to insert string in that text where is novac = "0000%d";
and then instead of %d write my money and then in the end of it be: 0000mymoney
i think u understand me

Код:
new MoneyString[50], novac[50];
if(PlayerInfo[playerid][pBanka] >= 1) novac = "000000%d";
if(PlayerInfo[playerid][pBanka] >= 10) novac = "00000%d";
if(PlayerInfo[playerid][pBanka] >= 100) novac = "0000%d";
if(PlayerInfo[playerid][pBanka] >= 1000) novac = "0000%d";
if(PlayerInfo[playerid][pBanka] >= 10000) novac = "000%d";
if(PlayerInfo[playerid][pBanka] >= 100000) novac = "00%d";
if(PlayerInfo[playerid][pBanka] >= 1000000) novac = "0%d";
if(PlayerInfo[playerid][pBanka] >= 10000000) novac = "%d";
format(MoneyString,sizeof(MoneyString), "$%s", novac);
TextDrawSetString(TDMoney, MoneyString);
TextDrawShowForPlayer(playerid, TDMoney);
Reply


Messages In This Thread
string in txt - by xyzcod2 - 14.10.2013, 14:07
Re: string in txt - by Konstantinos - 14.10.2013, 14:10
Re: string in txt - by xyzcod2 - 14.10.2013, 14:13
Re: string in txt - by Konstantinos - 14.10.2013, 14:15
Re: string in txt - by xyzcod2 - 14.10.2013, 14:18

Forum Jump:


Users browsing this thread: 1 Guest(s)