Skip to content

Instantly share code, notes, and snippets.

@Kamshak Kamshak/Add New Button.md
Last active Jun 13, 2018

Embed
What would you like to do?
Pointshop 2 - Add external menu button

Adding a button to the PS2 Inventory section

It's easy to add a button that opens another menu. Here a report menu button was added:

img

Create a new file in garrysmod/lua/autorun/ps2_extrabuttons.lua with the following contents:

AddCSLuaFile()
Pointshop2:AddInventoryButton( "Report Menu", "pointshop2/warning8.png", function( )
  -- Run console command to open the report menu
	RunConsoleCommand( "report_open" )
  
  -- Optional, closes the shop after opening the report menu
  Pointshop2.CloseMenu( )
end )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.