I am extremely new to making plugins. I started an hour ago. This is what I've got so far.
I am trying to make a /purge plugin, that when you do /purge it says 'blah blah' to help you. I also would find it cool if I could send a message to the player when they respawn saying incase they got killed on sight etcCode:PLUGIN.Title = "Test" PLUGIN.Description = "This is a test plugin." PLUGIN.Author = "Matthew Lang" PLUGIN.Version = "1.0"function PLUGIN:Init() print("Purge has loaded.") self:AddChatCommand("purge", self.purge) endfunction OnKilled(TakeDamage takedamage, DamageEvent damage) rust.SendChatToUser(netuser, "Think you have been killed on sight and it is not a purge? Contact an admin.") end function PLUGIN:purge(netuser, cmd, args) rust.SendChatToUser(netuser, "Raiding and killing on sight is not allowed unless there is a purge happening. A purge happens every Friday & Saturday, GMT 0.") endfunction PLUGIN:SendHelpText(netuser) rust.SendChatToUser(netuser, "Use /purge to find out about what the purge is.") end
This doesn't work though. I'm testing it on a server host. Please help![]()
Solved Making a simple help command?
Discussion in 'Rust Development' started by Captain. Knee Gell, Aug 1, 2015.
-
Code:
command.AddChatCommand("purge", self.Plugin, "purge")
-
Firstly you are trying to make an Legacy Plugin.
Checkout the plugin named "HelpText" so you will see how its done.