Skip to content

httpRick/SA-Menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

San Andreas Menu (SA-MENU)

Screen:

Actions Status

Client Functions

createMenu

Paramters:

  • float position X
  • float position Y
  • string title Menu
  • strint type Menu 'default or shop' is the default mode is automatically selected returns the created Menu
createMenu(85, 350, "Example Menu")

createItem

Paramters:

  • element Menu
  • string left Item
  • string right Item returns the created Menu item
local theMenu = createMenu(85, 350, "Example Menu")
createItem(theMenu, "Left item", "Right item")

destroyMenu

Paramters:

  • element Menu returns true if the item is destroyed returns false if no item is found
local theMenu = createMenu(85, 350, "Example Menu")
destroyMenu(theMenu)

showMenu

Paramters:

  • element Menu returns true if the item is destroyed returns false if no item is found
local theMenu = createMenu(85, 350, "Example Menu")
showMenu(theMenu)

hiddenMenu

Paramters:

  • element Menu returns true if the item is destroyed returns false if no item is found
local theMenu = createMenu(85, 350, "Example Menu")
hiddenMenu(theMenu)

setMenuType

Paramters:

  • element Menu
  • string Menu type Available menu types are: "default", "shop" returns true if a good type is input, otherwise false
local theMenu = createMenu(85, 350, "Example Menu")
setTypeMenu(theMenu, "shop")

setMenuColumn

Paramters:

  • element Menu
  • string left column
  • string right column

🔴 Only for the store type

local theMenu = createMenu(85, 350, "Example Menu")
setTypeMenu(theMenu, "shop")
setMenuColumn(theMenu, "Products", "Price")

Clientside event

onClientMenuSelect

Paramters:

  • string Item1
  • string Item2

returns the item that has been selected

function exampleSelect(theItem1, theItem2)
    print(theItem1, theItem2, "select this item")
end
addEventHandler("onClientMenuSelect", theItem, exampleSelect)

onClientMenuExit

Paramters:

  • the player who closed the menu return a Menu element that has been closed is returned
function exampleEscape(theMenu)
    print(theMenu, "menu is closed")
end
addEventHandler("onClientMenuSelect", theMenu, exampleEscape)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages