Ulysses

General => Developers Corner => Topic started by: Jewson on July 18, 2018, 07:59:28 PM

Title: [SOLVED] Slash commands
Post by: Jewson on July 18, 2018, 07:59:28 PM
Hello,
I'm new to forum and new to ULX and ULib (code side ofc). And I'm coding RP gamemode. I decided to integrate ULX permissions into my gamemode to not make my own. I did my own chat command thing to recognize commands and execute them in console. And it works ( or worked ). It reacts to "/" commands and I did "/addmoney" and /setmoney and when I try to type them in I get this in console: "Unknown command: addmoney" and "Unknown command: setmoney". When I type for eg. "/ajhdajs" my system reacts but with two command mentioned earlier it doesn't work.

I think it is ULX causes that, because before I added ULX and ULib to my server/gamemode it worked perfectly.

Thanks to all of you who help me.
Title: Re: Slash commands
Post by: iViscosity on July 18, 2018, 08:11:56 PM
ULX doesn't give "Unknown command" messages unless actually doing "ulx <command>" in the console. Chat commands won't give that to you. Is that the full message that you are given or is there more?
Title: Re: Slash commands
Post by: Jewson on July 18, 2018, 08:21:43 PM
Ok I found my mess up. I was inserting in this "ply:ConCommand( commandstring )", at the beginning a beginning of chat command not console command from the table. Now I changed that to insert a chat command and now it works.

Thank you anyway.

PS. To all of you out there. Remember to double check your code.
Title: Re: Slash commands
Post by: JamminR on July 18, 2018, 08:32:45 PM
Welcome to Ulysses, welcome to ULib.
Please don't use language, even censored out, most parents wouldn't want a 6 year old hearing.
Title: Re: Slash commands
Post by: Jewson on July 19, 2018, 12:36:52 AM
Ok daddy. :D
jk
I was just writing it when I was so tired.