10-07-2014, 02:25 AM
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:
Thanks for your help! I really want to learn more about lua.
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