Hi. I am trying to make a plugin that block a command. I don't use the plugin Command Block, because I need a plugin that do that but in C#
This is what I have:
It does not work. I don't know what to do.Code:void OnRunCommand(ConsoleSystem.Arg arg, BasePlayer player) { if (comnd == "somecommand") { return false; } }
Thank you.
Solved Blocking a command? (C#)
Discussion in 'Rust Development' started by Reynostrum, Dec 30, 2015.
-
Wulf Community Admin
Why do you need a plugin to be in C#? The Lua version should work just fine.
Code:object OnRunCommand(ConsoleSystem.Arg arg) { if (arg?.connection != null && arg.cmd.namefull == "global.spectate") return true; return null; }
-
Amazing @Wulf.
I need it on C# because I am making a plugin that replace status command. I am trying to style it.
Thank you Wulf!!!!! -
Wulf Community Admin
Code:object OnRunCommand(ConsoleSystem.Arg arg) { if (arg?.connection !=null && arg.cmd.namefull == "global.status") { Puts("Yay status command works!"); } return null; }
-
error CS1525: Unexpected symbol `object'
-
Wulf Community Admin
-
yes ı can
Attached Files:
-
-
Wulf Community Admin
-
where is the command block plugin
-
Wulf Community Admin
-
Thank you so much. <3