General > Developers Corner

Displaying damagelogs?

<< < (2/2)

MrPresident:
Or.. There is this function:

ulx.fancyLogAdmin( ply, "#A was damaged by #T for INSERTCODE damage", target_ply )

where ply is the player damaged and target_ply is the player who did the damage. This would then show in the console and on the chat of admins.

aaron:

--- Quote from: MrPresident on June 30, 2013, 11:37:06 AM ---So are you wanting it to show in the console for your admins/mods as well as being logged in the servers ULX logs? If so, you'll need to send it as a message to the players. Use something like:

ULib.console(ply, message)

this would print a message to all admins console:

--- Code: ---for k, v in pairs (player.GetAll()) do
    if v:IsAdmin() or v:IsUserGroup("moderator") then
        ULib.console(v, "This message will show up in the console")
    end
end

--- End code ---

Let me know if this helps.

--- End quote ---

I wasn't looking for the logs to be logged but it's only a bonus if they are.  Thank you for your help.

Navigation

[0] Message Index

[*] Previous page

Go to full version