Skip to content

Instantly share code, notes, and snippets.

@Y-Less
Created July 31, 2015 16:55
Show Gist options
  • Select an option

  • Save Y-Less/8dc094bfe3400a9ed36e to your computer and use it in GitHub Desktop.

Select an option

Save Y-Less/8dc094bfe3400a9ed36e to your computer and use it in GitHub Desktop.
SA:MP Menu DSL example
#define T MTitle
#define E MEntry
#define D MDisabled
new MENU:BuyStuff = NewMenu()
% T("Buy Things")
* E("Weapons")
% T("Weapons")
* E("Minigun")
* E("Desert Eagle")
/ E("Knuckle Dusters")
* E("Vehicles")
% T("Vehicles")
* E("Banshee")
* E("Infernus")
* E("Boat")
% T("Boats")
* E("Predator")
/ E("Reefer")
/ E("Tank")
* E("Clothes")
% T("Clothes")
* E("Hat")
* D("No Gloves Available")
/ E("Cap")
;
ShowMenu(playerid, BuyStuff);
@Y-Less
Copy link
Author

Y-Less commented Jul 31, 2015

Two problems:

  1. You can't have children on the last item in a sub-menu.
  2. You can't have a sub-menu with only one item (but you should have a title and at least one item anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment