[Tutorial] How To Make simple Shop and /rules menu
#6

Quote:
Originally Posted by qazwsx
View Post
Yes, Of course, It could be added like this.

Code:
if(listitem == 0)
	        	{
	            	GivePlayerWeapon(playerid, 25, 390);
	            	SendClientMessage(playerid, -1, "You Have Bought 390 package of Shotgun Ammo");
GivePlayerMoney(playerid, -1000); // 1000 is the price of weapon. You can change it. 
	        	}
You have write, that if a player has $999 or lower then that, he can still buy a gun.

It should be :

pawn Code:
if(listitem == 0)
{
    if(GetPlayerMoney(playerid) > 1000)
    {
        GivePlayerMoney(playerid, -1000);
        GivePlayerWeapon(playerid, 25,390);
        SendClientMessage(playerid, -1, "You Have Bought 390 package of Shotgun Ammo");
    }
    else SendClientMessage(playerid, -1, "ERROR: You Don't Have Enought Money!");
}
Reply


Messages In This Thread
How To Make simple Shop and /rules menu - by qazwsx - 31.07.2013, 10:34
Re: How To Make simple Shop and /rules menu - by AaronKillz - 31.07.2013, 10:36
Re: How To Make simple Shop and /rules menu - by Mckarlis - 31.07.2013, 11:21
Re: How To Make simple Shop and /rules menu - by Mckarlis - 31.07.2013, 12:24
Re: How To Make simple Shop and /rules menu - by qazwsx - 31.07.2013, 13:08
Re: How To Make simple Shop and /rules menu - by Areax - 31.07.2013, 14:16
Re: How To Make simple Shop and /rules menu - by qazwsx - 31.07.2013, 14:35
Re: How To Make simple Shop and /rules menu - by Necip - 31.07.2013, 15:20
Re: How To Make simple Shop and /rules menu - by qazwsx - 31.07.2013, 15:28
Respuesta: How To Make simple Shop and /rules menu - by Marricio - 01.08.2013, 01:57

Forum Jump:


Users browsing this thread: 1 Guest(s)