• Admin Mod Suggestions
    7 replies, posted
Hey guys, recently I thought I would try and learn a bit of Lua, so I decided to make my own admin mod(with a bit of help), I aint releasing it so don't worry about any more shit ones getting released, I just need some ideas for plugins, like fun and punishment. All ideas are greatly appreciated.
those aren't plugins
You'r not very helpfully, please give me some ideas.
Umm... just throwing a few things out there Punishment [list][*]Meteor Strike - Freeze the player and have something large rain down on their head [*][url=http://www.facepunch.com/showthread.php?t=824555&highlight=bidoof]Bidoof[/url] [/list] Fun [list][*]Super Jump - Give people the ability to jump really high! [*]Ghost - be able to turn into a prop and fly around [/list] That should get ya started.
[QUOTE=samwilki;19992078]You'r not very helpfully, please give me some ideas.[/QUOTE] Seriously though, that's not a plugin system.
Go away then, I am not very advanced with Lua, I am always learning but your "Seriously though, that's not a plugin system." isn't helping me learn now is it, so either give me some ways to do it better or go away.
[QUOTE=samwilki;19997838]Go away then, I am not very advanced with Lua, I am always learning but your "Seriously though, that's not a plugin system." isn't helping me learn now is it, so either give me some ways to do it better or go away.[/QUOTE] Your "plugin" system was to have lots of lua files similar to these: [lua] concommand.Add("slay" , function(ply , cmd, args) if !ply:IsAdmin() then ply:ChatPrint("[WILKI-ADMIN] You do not have permission to do this.") elseif not args[1] then Ply:ChatPrint("[WILKI-ADMIN] Please specify a player to slay.") else for k , t in ipairs(player.GetAll()) do if string.find(string.lower(t:Nick()) , string.lower(args[1])) then t:Kill() for k , v in ipairs(player.GetAll()) do v:ChatPrint("[WILKI-ADMIN] " .. ply:Nick() .. " slayed " .. t:Nick() .. ".") end end end end end ) [/lua] [b]That is not a plugin system.[/b] Here's an example of a plugin system, taken from an admin mod I'm working on: [lua] local Plugin = {} Plugin.Name = "Slay" Plugin.Verb = " slayed " Plugin.CC = "slay" function Plugin.Command( ply, cmd, args ) local plf = SethAdmin.PlayerFind( ply, args[1] ) if plf then plf:Kill() SethAdmin.Notify( ply, Plugin.Verb, plf ) end end SethAdmin.AddPlugin( Plugin ) [/lua] See the difference? [editline]01:36AM[/editline] that helped right
But how will I use that? In my init.lua what do I add to make it load all plugins.
Sorry, you need to Log In to post a reply to this thread.