I need some help with Rust Experimental Lua chat commands, This is what i have
But the chat command howru does not exist can someone help me? do i have to compile something or add dlls? or do i just save it in notepad++?Code:function PLUGIN: init() command.AddChatCommand("howru", self.Plugin, "hicmd") endfunction PLUGIN: hicmd(player, cmd, args) rust.SendChatMessage(player, "Hello") end
Thanks -Max
Solved Lua chat commands not working (format wrong)
Discussion in 'Rust Development' started by Smurflings!, Jul 19, 2015.
-
Wulf Community Admin
Remove the spaces after PLUGIN: in both instances. Also make sure you have the correct headers that define your plugin; you can find them in the Docs.
-
-
Wulf Community Admin
-
Code:
PLUGIN.Title = "hello" PLUGIN.Description = "Hello Plugin" PLUGIN.Author = "RusySalt" PLUGIN.Version = V(1, 1, 1) PLUGIN.ResourceId = 979function PLUGIN:init() command.AddChatCommand("howru", self.Plugin, "hicmd") endfunction PLUGIN: hicmd(player, cmd, args) rust.SendChatMessage(player, "HELLO", "Hello how are you?") end
-
Wulf Community Admin
Code:PLUGIN.Title = "Hello" PLUGIN.Description = "Hello plugin" PLUGIN.Author = "RusySalt" PLUGIN.Version = V(1, 1, 1)function PLUGIN:Init() command.AddChatCommand("howru", self.Plugin, "HiCmd") endfunction PLUGIN:HiCmd(player, cmd, args) rust.SendChatMessage(player, "HELLO", "Hello how are you?") end