So I'm doing an alias command system, but i need to find a way to send the 'original' command back as a ChatCommand, but i only found a ConsoleCommand method.
Example:
/smo 10 => Will go to the chat command method, will retrieve the 'long version' command and will send it back, this case, /sell metal ore 10.
I've got the entire system up and running, but only for Console commands, using the BasePlayer.Command(command, arguments); method.
Question for wulf: Is this possible to be done right now, if not, can you add the possibility ?
Thanks.
Sending a player command C#
Discussion in 'Rust Development' started by WolfsDarker, Aug 20, 2015.
-
You can hook methods from other plugins. I think..
-
Yeah I know you can, but i want to make this "OOP", i don't want to hook anything, i want it just to receive a command and call another, regardless if the other command exist and what uses it
-
Umm I don't want to intterupt you, but if you are not that far yet and this should be a public plugin, I've done such already. Just need basic testing then im ready to upload it.
-
Oh. Can you show little piece of code?
-
I've wrote the entire structure already, the only thing missing is this. At the moment its sending as console command, which you can adjust plugins to work like this since the Argument sent in console has the player instance, but will have to rely on plugins to change their system to console.
If you have this figured out, may i know how you did this? -
Welle as I said. Ive done the entire plugin already lol. Just saying. I may be able to upload it in the next houres. @deer_SWAG you can take a look at the Code then.
[DOUBLEPOST=1440291536,1440187223][/DOUBLEPOST]@WolfsDarker , @deer_SWAG
http://oxidemod.org/plugins/alias-system.1307/
