Logging kills to console for admins

Requesting a way to log kills into the console for administrators. Specifically ULX, because apparently there’s no built-in method for doing this.

Aren’t they already logged?

I thought they logged too, they save into the ulx logs and also into console.

Is that enabled by default? I can’t find a toggle or any sort of option to enable this, and it’s not happening as of right now. Any guidance?

I think he means only show who killed who in the admin console and not just a regular user’s console.

Yes, that is what I mean.

[lua]
function Death( victim, weapon, killer )
for k,ply in pairs(player.GetAll()) do
if ply:IsAdmin() then
Msg( killer:GetName()…" Killed Player " … victim:GetName() … "
" )
end
end
end
hook.Add( “PlayerDeath”, “dr”, Death )[/lua]

Did you make sure it doesn’t print in regular user’s consoles? Return false at the end maybe?

You don’t need to, basically it says if a player is admin, then this this and this, end, nothing else happens, nothing happens for the clients.

[lua]
function Death( victim, weapon, killer )
for k,ply in pairs(player.GetAll()) do
if ply:IsAdmin() then
ply:ChatPrint( killer:GetName()…" Killed Player " … victim:GetName() … "
" )]]
end
end
end
hook.Add( “PlayerDeath”, “dr”, Death )[/lua]

fixed

You’re stupid shut up.

What the hell, I was informing the guy above me… what the hell is wrong with you Cubar

Learn more lua before posting please.

I was telling the guy you don’t need to return false, because you have not told it to do anything for the clients, so it won’t have anything to do.

:ms:

You know, instead of saying I’m dumb and should learn lua before posting, maybe ask nicely, “What do you mean by that?”

You’re dumb.

Obviously some people are born this way, but anyway, I think the question has been answered, so no point in anyone else posting.