Need Help with money check
#1

is this correct? doesnt seems to be working

pawn Код:
if(current == colt45) //Colt45
    {
        switch(row)
        {
            case 0: if( GetPlayerMoney(playerid)  <  240) return SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money!"), ShowMenuForPlayer(colt45, playerid); else { GivePlayerWeapon(playerid, 22, 30), GivePlayerMoney(playerid, -240), ShowMenuForPlayer(colt45, playerid);
            }
        }
    }
Reply
#2

pawn Код:
if(current == colt45) //Colt45
    {
        switch(row)
        {
            case 0:
{
if( GetPlayerMoney(playerid)  <  240)
{
SendClientMessage(playerid, COLOR_RED, "ERROR : You don't have enough money!");
ShowMenuForPlayer(colt45, playerid);
return 1;
}
else
{
GivePlayerWeapon(playerid, 22, 30), GivePlayerMoney(playerid, -240), ShowMenuForPlayer(colt45, playerid);
}
}
}

Try this. And indent ur code, don't write everything to 1line.
Reply
#3

alright thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)