General > Developers Corner
Ignore PlayerSay
iViscosity:
It's all in the code. It doesn't detect hooks or skip them or anything, it simply doesn't use them.
dankpepe:
How does ulx know to execute a command when someone types a command in chat without using hooks?
iViscosity:
It's in the command. When you define a ulx.command at the bottom of the code, you can assign a command line which, when you use in the chat, it will execute that command.
Bytewave:
--- Quote from: iViscosity on June 19, 2016, 10:27:52 AM ---It's in the command. When you define a ulx.command at the bottom of the code, you can assign a command line which, when you use in the chat, it will execute that command.
--- End quote ---
You're misinterpreting things.
ulx.command registers a new command, telling UL(x|ib) that you want x to happen when y is said or z is run in the console. HOWEVER, this does not mean hooks aren't used internally. They are, in fact, used.
This hook is registered with HOOK_HIGH priority. The hook responsible for gimps and mutes is registered with HOOK_LOW priority. Therefore, the PlayerSay hook that checks for commands takes the highest precedence (if I understand ULib's improved hook system correctly).
iViscosity:
Ah, what I was thinking was you don't need to specifically specify a hook when making the command.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version