Ulysses

General => Developers Corner => Topic started by: Unknown Gamer on December 31, 2014, 04:26:05 PM

Title: How to add !donate to the "Menus" tab in ULX?
Post by: Unknown Gamer on December 31, 2014, 04:26:05 PM
Just wondering how do I add a donate, or any other menu to the "Menus" tab in the !menu? More so how do I edit the pre installed donate button?
(http://i.gyazo.com/0a32e139bf9c2cb0d6ad4991b50e5865.png)
Title: Re: How to add !donate to the "Menus" tab in ULX?
Post by: Caustic Soda-Senpai on December 31, 2014, 05:55:30 PM
You add anything to the Menu by putting it in the Menu Category while coding it. To edit it, go to ulx/lua/ulx/modules/sh/menus.lua
Title: Re: How to add !donate to the "Menus" tab in ULX?
Post by: Unknown Gamer on December 31, 2014, 08:35:08 PM
You add anything to the Menu by putting it in the Menu Category while coding it. To edit it, go to ulx/lua/ulx/modules/sh/menus.lua

I know, What is the code though :P THe code i keep putting in is not working and creates errors.
Title: Re: How to add !donate to the "Menus" tab in ULX?
Post by: Caustic Soda-Senpai on December 31, 2014, 10:04:31 PM
local CATEGORY_NAME = "Menus"

at the beginning of the ULX script

for donate, I'm assuming you're using the Custom Command pack, yes?
If so, navigate to CustomCommands/lua/ulx/modules/sh/cc_cvars.lua and edit

Code: [Select]
CreateConVar( "donate_url", "http://www.google.com" )to whatever you need to suit your purposes


Title: Re: How to add !donate to the "Menus" tab in ULX?
Post by: Bytewave on January 01, 2015, 12:02:41 PM
local CATEGORY_NAME = "Menus"

at the beginning of the ULX script

for donate, I'm assuming you're using the Custom Command pack, yes?
If so, navigate to CustomCommands/lua/ulx/modules/sh/cc_cvars.lua and edit

Code: [Select]
CreateConVar( "donate_url", "http://www.google.com" )to whatever you need to suit your purposes
... Or, since it's a convar, just add it to server.cfg.
Code: [Select]
donate_url "http://google.com"
Title: Re: How to add !donate to the "Menus" tab in ULX?
Post by: Unknown Gamer on January 01, 2015, 06:55:31 PM
Thanks Guys :D