2013-01-28 11:54:11 -05:00
|
|
|
function OnKilling(Victim, Killer)
|
|
|
|
if (Killer == nil) then
|
|
|
|
local KilledPlayer = tolua.cast(Victim, "cPlayer")
|
2012-01-26 18:10:49 -05:00
|
|
|
if( not KilledPlayer:IsA("cPlayer") or KilledPlayer == nil ) then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
local Server = cRoot:Get():GetServer()
|
|
|
|
Server:SendMessage( cChatColor.Red .. KilledPlayer:GetName() .. " died" )
|
|
|
|
else
|
2013-01-28 11:54:11 -05:00
|
|
|
local KilledPlayer = tolua.cast(Victim, "cPlayer")
|
2012-01-26 18:10:49 -05:00
|
|
|
if( not KilledPlayer:IsA("cPlayer") or KilledPlayer == nil ) then
|
|
|
|
return false
|
|
|
|
end
|
2013-01-28 11:54:11 -05:00
|
|
|
local KillerPlayer = tolua.cast(Killer, "cPlayer")
|
2012-01-26 18:10:49 -05:00
|
|
|
if( not KillerPlayer:IsA("cPlayer") or KillerPlayer == nil ) then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
local Server = cRoot:Get():GetServer()
|
|
|
|
Server:SendMessage( cChatColor.Red .. KilledPlayer:GetName() .. " was killed by " .. KillerPlayer:GetName() .. "!" )
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
end
|