Ulysses

General => Developers Corner => Topic started by: DeadVCR on February 09, 2017, 03:47:28 PM

Title: ULX Custom Command
Post by: DeadVCR on February 09, 2017, 03:47:28 PM
CATEGORY_NAME = "Emotes"

function ulx.emotes(ply)
ply:RunConsoleCommand(+AudioEmotePanel_Show)
end
local emote = ulx.command( CATEGORY_NAME, "ulx emotes", ulx.emotes", "!emotes" )
emote:defaultAccess( Ulib.ACCESS_ALL )
emote:help( "Emote list." )

So I have that in the ULX Modules folder in my server, but when run the command in game nothing happens.
I know +AudioEmotePanel_Show works because I have it bound to a key.

Any ideas?
Title: Re: ULX Custom Command
Post by: iViscosity on February 09, 2017, 03:49:28 PM
First: wrong section, and second: check the difference between (http://wiki.garrysmod.com/favicon.ico) RunConsoleCommand (http://wiki.garrysmod.com/page/Global/RunConsoleCommand) and (http://wiki.garrysmod.com/favicon.ico) Player:ConCommand (http://wiki.garrysmod.com/page/Player/ConCommand)
Title: Re: ULX Custom Command
Post by: DeadVCR on February 09, 2017, 03:50:52 PM
First: wrong section, and second: check the difference between (http://wiki.garrysmod.com/favicon.ico) RunConsoleCommand (http://wiki.garrysmod.com/page/Global/RunConsoleCommand) and (http://wiki.garrysmod.com/favicon.ico) Player:ConCommand (http://wiki.garrysmod.com/page/Player/ConCommand)

Oh shoot I'm so sorry...
And thanks :)
Title: Re: ULX Custom Command
Post by: DeadVCR on February 10, 2017, 09:08:24 AM
First: wrong section, and second: check the difference between (http://wiki.garrysmod.com/favicon.ico) RunConsoleCommand (http://wiki.garrysmod.com/page/Global/RunConsoleCommand) and (http://wiki.garrysmod.com/favicon.ico) Player:ConCommand (http://wiki.garrysmod.com/page/Player/ConCommand)

Hey, thank you SO much for the help. It worked!