#include <zcmd>
#define SHOP_MENU 999 // 999 is the id for Our Shop Menu that will be used later #define RULES_MENU 777 // same like that ive explained above
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 999)// this is for check, if the dialog id = 999, we will do these below
	{
	    if(response)// if they response for the menus of dialog
	    {
	        if(listitem == 0)// if they response of the first list, we will do these below. We gotta make shop menu, so example the first list is shotgun, then we will give player shotgun weapon.
	        {
	            	GivePlayerWeapon(playerid, 25, 390);
	            	SendClientMessage(playerid, -1, "You Have Bought 390 package of Shotgun Ammo");
	        }
	        
	        if (listitem == 1)// same like above that ive explained.
	        {
	            	GivePlayerWeapon(playerid, 34, 100);
	            	SendClientMessage(playerid, -1, "You Have Bought 100 package of sniper");
	        }
	    }
	}
	return 1;
}
CMD:shop(playerid, params[])
{
    ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "My Shop", "Shotgun\nSniper", "Buy","");// " My shop " is the text that will be shown or the tittle in the top of our menu. Shotgun and sniper is the list of menu. 999 Is the ID of our shop dialog that we have defined before. That \n is command in pawno kind of when you press "enter" button on notepad. "Buy" is the button that stands for to buy weaps
	return 1;
}
CMD:rules(playerid, params[])
{
ShowPlayerDialog(playerid, 999, DIALOG_STYLE_MSGBOX, "My Server Rules", "No Hacking Or Advertising\nNo Cbugging or Stop Animation\nNo Insulting other Player\nNo Car Ramming or HeliKilling\nNo Using 3rd Party tools that give player more advantage\nPlease Follow these rules", "Ok","");
return 1;
}

 
if(listitem == 0)
{
if(GetPlayerMoney(playerid)>1000)
{
SendClientMessage(playerid, COLOR_WHITE, "You Have Bought 390 of Shotgun Ammo);
GivePlayerWeapon(playerid, 25, 390);
GivePlayerMoney(playerid, -1000); // 1000 is the price of shotgun. You can change it
}
else()
{
SendClientMessage(playerid, COLOR_WHITE, "You Dont Have Enough Money");
}
}
| 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. 
	        	} | 
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!");
}
| You have write, that if a player has $999 or lower then that, he can still buy a gun. It should be : pawn Code: 
 | 

 
| Good tutorial. Next time use [ pawn ] [  /pawn ] instead of those Code. | 
 
#define SHOP_MENU 999 // 999 is the id for Our Shop Menu that will be used later
#define RULES_MENU 777 // same like that ive explained above