Changing symbol used for chat commands?Solved
Hello, everybody,

how can I change the command prefix?
Currently it is "/", I would like change it to "!"

f.e. instead of /players, players need to type !players


Thanks in advance
You'd need to make your own Oxide build which would listen to commands with that prefix. Will not be supported here tho.
Just listen with OnPlayerChat in a plugin. Don't pretend to be "vanilla" though. ;)
5c2d88ae4ea06.jpg Wulf
Just listen with OnPlayerChat in a plugin. Don't pretend to be "vanilla" though. ;)

I think he wants to make all the plugins responce to that prefix.

5ba0b9633e817.png?uid=5ba0b9716c220 2CHEVSKII

I think he wants to make all the plugins responce to that prefix.

They should be able to via that hook.
5c2d88ae4ea06.jpg Wulf
They should be able to via that hook.
Would that be interpreted as a real command if you change a prefix using hook? Never knew that
5ba0b9633e817.png?uid=5ba0b9716c220 2CHEVSKII
Would that be interpreted as a real command if you change a prefix using hook? Never knew that
No, you wouldn't be registering a command, just intercepting chat which is essentially what our chat command system does.
5c2d88ae4ea06.jpg Wulf
No, you wouldn't be registering a command, just intercepting chat which is essentially what our chat command system does.

I meant, something like this will work as command?

object OnPlayerChat(ConsoleSystem.Arg arg)
		{
			arg.Args[0] = arg.Args[0].Replace("!", "/");
			return null;
		}
5ba0b9633e817.png?uid=5ba0b9716c220 2CHEVSKII

I meant, something like this will work as command?

object OnPlayerChat(ConsoleSystem.Arg arg){arg.Args[0] = arg.Args[0].Replace("!", "/");return null;}
No, not likely.
Locked automatically