ULX

Author Topic: [SOLVED] Slash commands  (Read 2120 times)

0 Members and 1 Guest are viewing this topic.

Offline Jewson

  • Newbie
  • *
  • Posts: 3
  • Karma: -2
[SOLVED] Slash commands
« 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.
« Last Edit: July 19, 2018, 04:49:46 AM by Jewson »

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Slash commands
« Reply #1 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?
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Jewson

  • Newbie
  • *
  • Posts: 3
  • Karma: -2
Re: Slash commands
« Reply #2 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.
« Last Edit: July 19, 2018, 12:38:09 AM by Jewson »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Slash commands
« Reply #3 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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Jewson

  • Newbie
  • *
  • Posts: 3
  • Karma: -2
Re: Slash commands
« Reply #4 on: July 19, 2018, 12:36:52 AM »
Ok daddy. :D
jk
I was just writing it when I was so tired.