ULX

Author Topic: Making this show as a button?  (Read 1832 times)

0 Members and 1 Guest are viewing this topic.

Offline aaron

  • Newbie
  • *
  • Posts: 14
  • Karma: 1
Making this show as a button?
« on: August 31, 2013, 01:01:46 PM »
Nevermind - Figured it out. For some reason ulx updated so much when I was doing the command but then it stopped updating. I added myself to superadmin again(It showed my name twice in the superadmin list) I then added myself to admin and the command was gone even though the access is for all.

All seems to be sorted now though.


Hey, I've got this command that opens the KOS areas of maps when you type !donate but I'd like it to show up in ULX like the motd and thetime does.




I'd appreciate the help, thank you :)


I will be adding it to its own tab in ulx soon too. I will also be adding multiple ones for other things.

Code: [Select]
local CATEGORY_NAME  = "Chat"
function ulx.kos ( pl, text, teamonly )

    pl:SendLua([[gui.OpenURL("http://forums.gamersinblack.com/showthread.php?202-KOS-Areas")]]) -- Change ADDRESS to your chosen page.
    for k, v in pairs(player.GetAll()) do v:ChatPrint( pl:Nick() .. " is checking out the KOS areas" )
end    
end
local kos = ulx.command( CATEGORY_NAME, "ulx kos", ulx.kos, "!kos" )
kos:defaultAccess( ULib.ACCESS_ALL )
kos:help( "Shows you the KOS areas!" )


It's in the setting for chat -


But not the command list -

« Last Edit: August 31, 2013, 01:21:22 PM by aaron »

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Making this show as a button?
« Reply #1 on: August 31, 2013, 01:59:40 PM »
Glad you got it figured out!  There are a couple bugs dealing with XGUI and changing usergroups that I haven't quite tracked down yet, which should explain your issue. If you have any questions about interfacing with XGUI at all, feel free to ask me here because it's hardly documented and probably confusing! :P
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline aaron

  • Newbie
  • *
  • Posts: 14
  • Karma: 1
Re: Making this show as a button?
« Reply #2 on: August 31, 2013, 02:12:47 PM »
Glad you got it figured out!  There are a couple bugs dealing with XGUI and changing usergroups that I haven't quite tracked down yet, which should explain your issue. If you have any questions about interfacing with XGUI at all, feel free to ask me here because it's hardly documented and probably confusing! :P


I'll keep that in mind, thank you :)