[HELP] Money commands.
#1

I need help with making a money command basically i'm making a ShopSystem around LS, But i was struggling with Making the money commands,

And if anyone could provide a code, It'll be very appreciated.

*EDIT: I use ZCMD also.*

How Would i add a money command/code to a case?

pawn Код:
CMD:buy(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 2.0134,-29.0133,1003.5494);
    {
        ShowPlayerDialog(playerid, DIALOG_JEFFSHOPMENU, DIALOG_STYLE_LIST, "{21D150}Store Counter", "{orange}Baseball Bat \t\t{white}$15 \n{orange}Sprunk \t\t{white}$5 \n{orange}Kevlar \t\t{white}$100", "Select", "Exit");
    }
}
Reply
#2

ondialogresponse:

PHP код:
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid0xFFFFFF"You don't have the Money!");
                        
GivePlayerMoney(playerid, -3000);//removing 3000$ , u can edite it
                        
GivePlayerWeapon(playerid31,100);// Spawning to him a M4
                        
PlayerPlaySound(playerid10570.00.010.0);//Playing the Sound
                        
SendClientMessage(playerid0x9EC73DAA"You bought a M4 and lose 3000$");
                    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)