Store plugin in a local variable to fix error on disable

master
Sam Mauldin 2013-12-23 20:58:39 -06:00
parent 5bbe72bc90
commit e593cef109
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,5 @@
local Carpets = {} local Carpets = {}
local PLUGIN
function Initialize( Plugin ) function Initialize( Plugin )
Plugin:SetName( "MagicCarpet" ) Plugin:SetName( "MagicCarpet" )
@ -10,6 +11,8 @@ function Initialize( Plugin )
local PluginManager = cPluginManager:Get() local PluginManager = cPluginManager:Get()
PluginManager:BindCommand("/mc", "magiccarpet", HandleCarpetCommand, " - Spawns a magical carpet"); PluginManager:BindCommand("/mc", "magiccarpet", HandleCarpetCommand, " - Spawns a magical carpet");
PLUGIN = Plugin
LOG( "Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() ) LOG( "Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() )
return true return true
end end