get amount onplayertext
#1

im trying to make deposit for bank, and am trying to use onplayertext for the amount part, something kind of like:

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(TestList[playerid] == 1)
    {
        new amount = strlen(text);
        new String[50];

        format(String, sizeof(String), "Amount = %i", amount);
        SendClientMessage(playerid, 0xE60000FF, String);

            TestList[playerid] = 0;
        return 0;
    }
    return 1;
}
the problem is the "amount" = how many characters there are, not the actual amount you entered. like 1234 = 4 instead of 1234.

so if you wanted to deposit $500 and enter "500", it say 3 instead because its 3 char..

i searched but cant find how to get the amount.

i hope i make myself clear, please help.
Reply


Messages In This Thread
get amount onplayertext - by happyface - 30.06.2009, 05:25
Re: get amount onplayertext - by Ignas1337 - 30.06.2009, 06:02
Re: get amount onplayertext - by happyface - 30.06.2009, 06:13
Re: get amount onplayertext - by Ignas1337 - 30.06.2009, 06:19

Forum Jump:


Users browsing this thread: 1 Guest(s)