[code]function whokilledwho(victim,inflictor,killer)
for k,v in pairs(player.GetAll()) do
if v:IsAdmin() then
if victim:IsValid() and killer:IsValid() and victim:IsPlayer() and killer:IsPlayer() then
v:PrintMessage(HUD_PRINTTALK,victim:Nick().." was killed by "..killer:Nick().."!")
end
end
end
end
hook.Add("PlayerDeath","informTheAdmins",whokilledwho)[/code]
How can I make this grab the name of the owner of a prop and display that "name prop killed name" if someone got prop killed.
[QUOTE=mishappp;21257831][code]function whokilledwho(victim,inflictor,killer)
for k,v in pairs(player.GetAll()) do
if v:IsAdmin() then
if victim:IsValid() and killer:IsValid() and victim:IsPlayer() and killer:IsPlayer() then
v:PrintMessage(HUD_PRINTTALK,victim:Nick().." was killed by "..killer:Nick().."!")
end
end
end
end
hook.Add("PlayerDeath","informTheAdmins",whokilledwho)[/code]
How can I make this grab the name of the owner of a prop and display that "name prop killed name" if someone got prop killed.[/QUOTE]
[lua]for k,v in pairs(player.GetAll()) do
if v:IsAdmin() then
if victim:IsValid() and killer:IsValid() and victim:IsPlayer() and killer:IsPlayer() then
v:PrintMessage(HUD_PRINTTALK,victim:Nick().." was killed by "..killer:Nick().."!")
elseif (string.find(killer, "prop_physics")) then
v:PrintMessage(HUD_PRINTTALK,victim:Nick().." was killed by a Prop!")
end
end
end
end
hook.Add("PlayerDeath","informTheAdmins",whokilledwho)[/lua]
Sorry, you need to Log In to post a reply to this thread.