Store plugin in a local variable to fix error on disable
This commit is contained in:
parent
5bbe72bc90
commit
e593cef109
@ -1,4 +1,5 @@
|
||||
local Carpets = {}
|
||||
local PLUGIN
|
||||
|
||||
function Initialize( Plugin )
|
||||
Plugin:SetName( "MagicCarpet" )
|
||||
@ -9,7 +10,9 @@ function Initialize( Plugin )
|
||||
|
||||
local PluginManager = cPluginManager:Get()
|
||||
PluginManager:BindCommand("/mc", "magiccarpet", HandleCarpetCommand, " - Spawns a magical carpet");
|
||||
|
||||
|
||||
PLUGIN = Plugin
|
||||
|
||||
LOG( "Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() )
|
||||
return true
|
||||
end
|
||||
@ -75,4 +78,4 @@ function OnPlayerMoving(Player)
|
||||
end
|
||||
Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() ) )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user