A customizable GTA Online–style interaction menu system for SA-MP.
Inspired by GTA Online’s interaction menu, it allows developers to add UI functionality to their SA-MP gamemodes.
This library provides a flexible way to create in-game menus with support for:
- 🔒 Locked items
- 🎚️ Scrollable options
- 📝 Support for per-item descriptions and titles
- 📡 Callbacks:
OnInteractionMenuResponse,OnScrollChange - 🎨 Customizable title box color
- 📜 Submenus
-
Copy
interaction_menu.incinto yourpawno/include/folder (or any folder in your include path). -
In your script, add:
#include <interaction_menu>
Warning
In some cases, by default or when redefining constants to higher values (such as MAX_MENU_ITEMS), the include requires a higher amount of memory, and will require you to increase the heap/stack size accordingly, after including all your libraries:
// Fix for " Run time error 3: "Stack/heap collision (insufficient stack size)"
// Serves as a maximum memory size for variables and arrays (ex: new string[8192])
#pragma dynamic 4096*2
#define CGEN_MEMORY (60000) // Fix for CGen space errorNew lines: separate items with \n
Locked items: wrap the text with # → #Locked Option#
Scrollable items: put options inside [] separated by commas → [Low, Medium, High]
ShowPlayerInteractionMenu(playerid, menuid, items[], description[], color)
Show a menu to a player.
AddInteractionMenuItem(playerid, text[])
Add an item to the menu.
AddInteractionMenuItemEx(playerid, text[], description[])
Add an item with a custom box color.
RemoveInteractionMenuItem(playerid, index)
Remove an item from the menu.
OnInteractionMenuResponse(playerid, menuid, itemid)
Callback when a player selects an item.
OnScrollChange(playerid, menuid, itemid, scrollIndex)
Callback when a player scrolls through options.
Full usage, advanced examples, and callbacks are documented here: 👉 SA-MP Interaction Menu Docs
Pull requests are welcome! Feel free to suggest improvements, bug fixes, or new features. Please read the contribution guidelines before submitting.