Need help with making a "Clear Inventory on join" plugin
#1
Hi!
I'm currently trying to learn lua, and I tried to make a simple plugin that clears the player's inventory when joining the server. However, I would need some help on making this plugin work (sorry for my noobishness).

Here's what I've done so far:
Code:
function Initialize(Plugin) PLUGIN = Plugin Plugin:SetName("ClearInv") Plugin:SetVersion(1) cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_JOINED, MyOnPlayerJoined); LOG("Initialized ClearInv") return true end function OnPlayerJoined(Player) Player:GetInventory():Clear() return true end
Thanks for your help! I really want to learn more about lua.
Reply
Thanks given by:


Messages In This Thread
Need help with making a "Clear Inventory on join" plugin - by Mathias - 10-07-2014, 02:25 AM



Users browsing this thread: 1 Guest(s)