is not printing the textCode:public CashSystem() { Title = ExtensionInfo.Title; Name = ExtensionInfo.Name; Author = ExtensionInfo.Author; Version = ExtensionInfo.Version; HasConfig = true; ResourceId = ExtensionInfo.ResourceId; } [HookMethod("Init")] void Init() { var library = Interface.GetMod().GetLibrary<Command>("Command"); library.AddChatCommand("a", this, "a"); } [HookMethod("OnServerInitialized")] void OnServerInitialized() { LoadConfig(); } [ChatCommand("a")] void a(BasePlayer player, ConsoleSystem.Arg args) { player.ChatMessage("test"); }
[C#] Extension chat helloword
Discussion in 'Rust Development' started by igor1150, Apr 7, 2015.
-
I'm really new i'm not sure what you want but check this out
Code:[ChatCommand("a")] void a(BasePlayer player, ConsoleSystem.Arg args) { var message = "test"; rust.SendChatMessage({ player, message }); }
-
that wouldnt work
-
Ow he wants to print into console right ? i thought he want to send a message xD
-
by what I saw
the problem is that he is not recognizing
the "a" command is calling the callback
[DOUBLEPOST=1428458479][/DOUBLEPOST]
[DOUBLEPOST=1428460856][/DOUBLEPOST]someone has a simple extension example in C # and can give me?
[DOUBLEPOST=1428460971][/DOUBLEPOST]I think I'm doing it wrong -
Basic chat command example:
Code:namespace Oxide.Plugins { [Info("Example", "Mughisi", 1.0)] class Example : RustPlugin { void Init() { Puts("Example loaded."); } [ChatCommand("Example")] void Example(BasePlayer player, string cmd, string[] args) { SendReply(player, "You used the command example!"); } } }
-
as it says in the title
Want example for extension and not for plugin -
-
I just want an example
here I compile everything ok
the oxide matter dll
more commands in chat does not work
I think I'm doing something wrong -