Some additional changes
* Revert to Core:Call() - Removed variable
This commit is contained in:
parent
914a318b8e
commit
110c633c5f
@ -1,28 +1,19 @@
|
||||
IniFile = cIniFile( "settings.ini" )
|
||||
IniFile:ReadFile()
|
||||
UsePrefixes = IniFile:GetValueSet( "Messaging", "Prefixes", "true" )
|
||||
IniFile:WriteFile()
|
||||
Core = cPluginManager:Get():GetPlugin("Core")
|
||||
|
||||
function SendMessage(a_Player, a_Message)
|
||||
if (UsePrefixes) then
|
||||
a_Player:SendMessage(cChatColor.Yellow .. "[INFO] " .. cChatColor.White .. a_Message)
|
||||
else
|
||||
a_Player:SendMessage(cChatColor.Yellow .. a_Message)
|
||||
if (Core ~= nil) then
|
||||
Core:Call("SendMessage", a_Player, a_Message)
|
||||
end
|
||||
end
|
||||
|
||||
function SendMessageSuccess(a_Player, a_Message)
|
||||
if (UsePrefixes) then
|
||||
a_Player:SendMessage(cChatColor.Green .. "[INFO] " .. cChatColor.White .. a_Message)
|
||||
else
|
||||
a_Player:SendMessage(cChatColor.Green .. a_Message)
|
||||
if (Core ~= nil) then
|
||||
Core:Call("SendMessageSuccess", a_Player, a_Message)
|
||||
end
|
||||
end
|
||||
|
||||
function SendMessageFailure(a_Player, a_Message)
|
||||
if (UsePrefixes) then
|
||||
a_Player:SendMessage(cChatColor.Red .. "[INFO] " .. cChatColor.White .. a_Message)
|
||||
else
|
||||
a_Player:SendMessage(cChatColor.Red .. a_Message)
|
||||
if (Core ~= nil) then
|
||||
Core:Call("SendMessageFailure", a_Player, a_Message)
|
||||
end
|
||||
end
|
@ -1,8 +1,6 @@
|
||||
local Carpets = {}
|
||||
|
||||
function Initialize( Plugin )
|
||||
PLUGIN = Plugin
|
||||
|
||||
Plugin:SetName( "MagicCarpet" )
|
||||
Plugin:SetVersion( 2 )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user