1
0

Some additional changes

* Revert to Core:Call()
- Removed variable
This commit is contained in:
Tiger Wang 2013-10-08 20:53:37 +01:00
parent 914a318b8e
commit 110c633c5f
2 changed files with 7 additions and 18 deletions

View File

@ -1,28 +1,19 @@
IniFile = cIniFile( "settings.ini" ) Core = cPluginManager:Get():GetPlugin("Core")
IniFile:ReadFile()
UsePrefixes = IniFile:GetValueSet( "Messaging", "Prefixes", "true" )
IniFile:WriteFile()
function SendMessage(a_Player, a_Message) function SendMessage(a_Player, a_Message)
if (UsePrefixes) then if (Core ~= nil) then
a_Player:SendMessage(cChatColor.Yellow .. "[INFO] " .. cChatColor.White .. a_Message) Core:Call("SendMessage", a_Player, a_Message)
else
a_Player:SendMessage(cChatColor.Yellow .. a_Message)
end end
end end
function SendMessageSuccess(a_Player, a_Message) function SendMessageSuccess(a_Player, a_Message)
if (UsePrefixes) then if (Core ~= nil) then
a_Player:SendMessage(cChatColor.Green .. "[INFO] " .. cChatColor.White .. a_Message) Core:Call("SendMessageSuccess", a_Player, a_Message)
else
a_Player:SendMessage(cChatColor.Green .. a_Message)
end end
end end
function SendMessageFailure(a_Player, a_Message) function SendMessageFailure(a_Player, a_Message)
if (UsePrefixes) then if (Core ~= nil) then
a_Player:SendMessage(cChatColor.Red .. "[INFO] " .. cChatColor.White .. a_Message) Core:Call("SendMessageFailure", a_Player, a_Message)
else
a_Player:SendMessage(cChatColor.Red .. a_Message)
end end
end end

View File

@ -1,8 +1,6 @@
local Carpets = {} local Carpets = {}
function Initialize( Plugin ) function Initialize( Plugin )
PLUGIN = Plugin
Plugin:SetName( "MagicCarpet" ) Plugin:SetName( "MagicCarpet" )
Plugin:SetVersion( 2 ) Plugin:SetVersion( 2 )