Help, textdraw problem
#1

hello friends, good hise one string TextDraw with a bank, is below the TextDraw of money was so good before:
TextDraw of money: $000000010
TextDraw bank: $100
Then I wanted to make it look like this:
TextDraw of money: $000000010
TextDraw bank: $000000100
But do not know why'm like:
TextDraw of money: $000000010
Bank TextDraw $000000000100
How I can do to make it look how I want it?
I leave the code:
pawn Код:
new xxx[291]
    if(IsPlayerConnected(playerid))
    {
            if(PlayerInfo[playerid][pAccount] < 0 || PlayerInfo[playerid][pAccount] > 9){
            format(xxx, sizeof(xxx), "$0000000%d", PlayerInfo[playerid][pAccount]);
            TextDrawSetString(TextdrawBank1[playerid], xxx);
            TextDrawShowForPlayer(playerid, TextdrawBank1[playerid]);
            }
            else if(PlayerInfo[playerid][pAccount] < 10 || PlayerInfo[playerid][pAccount] > 99){
            format(xxx, sizeof(xxx), "$000000%d", PlayerInfo[playerid][pAccount]);
            TextDrawSetString(TextdrawBank1[playerid], xxx);
            TextDrawShowForPlayer(playerid, TextdrawBank1[playerid]);
            }
            else if(PlayerInfo[playerid][pAccount] < 100 || PlayerInfo[playerid][pAccount] > 999){
            format(xxx, sizeof(xxx), "$000000%d", PlayerInfo[playerid][pAccount]);
            TextDrawSetString(TextdrawBank1[playerid], xxx);
            TextDrawShowForPlayer(playerid, TextdrawBank1[playerid]);
            }
            else if(PlayerInfo[playerid][pAccount] < 1000 || PlayerInfo[playerid][pAccount] > 9999){
            format(xxx, sizeof(xxx), "$00000%d", PlayerInfo[playerid][pAccount]);
            TextDrawSetString(TextdrawBank1[playerid], xxx);
            TextDrawShowForPlayer(playerid, TextdrawBank1[playerid]);
            }
            else if(PlayerInfo[playerid][pAccount] < 10000 || PlayerInfo[playerid][pAccount] > 99999){
            format(xxx, sizeof(xxx), "$0000%d", PlayerInfo[playerid][pAccount]);
            TextDrawSetString(TextdrawBank1[playerid], xxx);
            TextDrawShowForPlayer(playerid, TextdrawBank1[playerid]);
            }
            else if(PlayerInfo[playerid][pAccount] < 100000 || PlayerInfo[playerid][pAccount] > 999999){
            format(xxx, sizeof(xxx), "$000%d", PlayerInfo[playerid][pAccount]);
            TextDrawSetString(TextdrawBank1[playerid], xxx);
            TextDrawShowForPlayer(playerid, TextdrawBank1[playerid]);
            }
            else if(PlayerInfo[playerid][pAccount] < 1000000 || PlayerInfo[playerid][pAccount] > 9999999){
            format(xxx, sizeof(xxx), "$00%d", PlayerInfo[playerid][pAccount]);
            TextDrawSetString(TextdrawBank1[playerid], xxx);
            TextDrawShowForPlayer(playerid, TextdrawBank1[playerid]);
            }
            else if(PlayerInfo[playerid][pAccount] < 10000000 || PlayerInfo[playerid][pAccount] > 99999999){
            format(xxx, sizeof(xxx), "$0%d", PlayerInfo[playerid][pAccount]);
            TextDrawSetString(TextdrawBank1[playerid], xxx);
            TextDrawShowForPlayer(playerid, TextdrawBank1[playerid]);
            }
            else if(PlayerInfo[playerid][pAccount] < 100000000 || PlayerInfo[playerid][pAccount] > 999999999){
            format(xxx, sizeof(xxx), "$%d", PlayerInfo[playerid][pAccount]);
            TextDrawSetString(TextdrawBank1[playerid], xxx);
            TextDrawHideForPlayer(playerid, TextdrawBank1[playerid]);
            TextDrawShowForPlayer(playerid, TextdrawBank1[playerid]);
            }
    }
Reply


Messages In This Thread
Help, textdraw problem - by Alienwar3 - 09.06.2013, 19:42
Respuesta: Help, textdraw problem - by Alienwar3 - 11.06.2013, 22:00
Re: Help, textdraw problem - by feartonyb - 11.06.2013, 22:05

Forum Jump:


Users browsing this thread: 1 Guest(s)