saving "amount" with a PVar
#1

fixed
Reply
#2

pawn Код:
new amount = strval(inputtext);
                if(!(1000 <= amount <= 1000000)) return SendClientMessage(playerid, COLOR_RED, "Invalid Amount, Min wager - $1000, Max wager - $1000000");
                {
                    if(GetPlayerMoney(playerid) < amount) return SendClientMessage(playerid, COLOR_RED,"You don't have that much cash!");
                    {
                                         //some other code here aswell.
                        amount = SetPVarInt(playerid,"amount",playerid);
                    }
                }
should be
pawn Код:
new amount = strval(inputtext);
if(!(1000 <= amount <= 1000000)) return SendClientMessage(playerid, COLOR_RED, "Invalid Amount, Min wager - $1000, Max wager - $1000000");
if(GetPlayerMoney(playerid) < amount) return SendClientMessage(playerid, COLOR_RED,"You don't have that much cash!");

amount = SetPVarInt(playerid,"amount", ammount); //You did set the ammount to the player's ID
I can't help you from now. Gotta go to school
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)