SA-MP Forums Archive
Need Help with money check - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need Help with money check (/showthread.php?tid=189848)



Need Help with money check - OldDirtyBastard - 13.11.2010

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);
            }
        }
    }



Re: Need Help with money check - 0ne - 13.11.2010

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.


Re: Need Help with money check - OldDirtyBastard - 13.11.2010

alright thanks.