ULX

Author Topic: How to add !donate to the "Menus" tab in ULX?  (Read 3571 times)

0 Members and 1 Guest are viewing this topic.

Offline Unknown Gamer

  • Jr. Member
  • **
  • Posts: 79
  • Karma: -2
    • TrueKnife TTT
How to add !donate to the "Menus" tab in ULX?
« 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?
Newb Coder. Soon to get better

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: How to add !donate to the "Menus" tab in ULX?
« Reply #1 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
Once you get to know me, you'll find you'll have never met me at all.

Offline Unknown Gamer

  • Jr. Member
  • **
  • Posts: 79
  • Karma: -2
    • TrueKnife TTT
Re: How to add !donate to the "Menus" tab in ULX?
« Reply #2 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.
Newb Coder. Soon to get better

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: How to add !donate to the "Menus" tab in ULX?
« Reply #3 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


Once you get to know me, you'll find you'll have never met me at all.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: How to add !donate to the "Menus" tab in ULX?
« Reply #4 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"
bw81@ulysses-forums ~ % whoami
Homepage

Offline Unknown Gamer

  • Jr. Member
  • **
  • Posts: 79
  • Karma: -2
    • TrueKnife TTT
Re: How to add !donate to the "Menus" tab in ULX?
« Reply #5 on: January 01, 2015, 06:55:31 PM »
Thanks Guys :D
Newb Coder. Soon to get better