Updated MagicCarpet and Core
This commit is contained in:
parent
1d51521f80
commit
0cf1c1d91d
@ -1 +1 @@
|
||||
Subproject commit 7f97e93ef25616673e8342b7919d9b5914e1327e
|
||||
Subproject commit 8ddc8a9d027a9471c72270ec82cc618069710faa
|
@ -1,19 +0,0 @@
|
||||
Core = cPluginManager:Get():GetPlugin("Core")
|
||||
|
||||
function SendMessage(a_Player, a_Message)
|
||||
if (Core ~= nil) then
|
||||
Core:Call("SendMessage", a_Player, a_Message)
|
||||
end
|
||||
end
|
||||
|
||||
function SendMessageSuccess(a_Player, a_Message)
|
||||
if (Core ~= nil) then
|
||||
Core:Call("SendMessageSuccess", a_Player, a_Message)
|
||||
end
|
||||
end
|
||||
|
||||
function SendMessageFailure(a_Player, a_Message)
|
||||
if (Core ~= nil) then
|
||||
Core:Call("SendMessageFailure", a_Player, a_Message)
|
||||
end
|
||||
end
|
@ -6,7 +6,7 @@ function Initialize( Plugin )
|
||||
Plugin:SetVersion( 2 )
|
||||
|
||||
cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_MOVING, OnPlayerMoving)
|
||||
cPluginManager.AddHook(cPluginManager.HOOK_DISCONNECT, OnDisconnect)
|
||||
cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_DESTROYED, OnDisconnect)
|
||||
|
||||
local PluginManager = cPluginManager:Get()
|
||||
PluginManager:BindCommand("/mc", "magiccarpet", HandleCarpetCommand, " - Spawns a magical carpet");
|
||||
@ -37,12 +37,12 @@ function HandleCarpetCommand( Split, Player )
|
||||
|
||||
if( Carpet == nil ) then
|
||||
Carpets[ Player ] = cCarpet:new()
|
||||
SendMessageSuccess(Player, "You're on a magic carpet!")
|
||||
SendMessage(Player, "Look straight down to descend. Jump to ascend.")
|
||||
Player:SendMessageSuccess("You're on a magic carpet!")
|
||||
Player:SendMessageInfo("Look straight down to descend. Jump to ascend.")
|
||||
else
|
||||
Carpet:remove()
|
||||
Carpets[ Player ] = nil
|
||||
SendMessageSuccess(Player, "The carpet vanished!")
|
||||
Player:SendMessageSuccess("The carpet vanished!")
|
||||
end
|
||||
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user