DarkRP.CanSeeLogMessage

From Official DarkRP Wiki
Jump to: navigation, search
This page refers to DarkRP 2.4.3. This information may be incorrect as of later versions.
Check here for a up-to-date list of hooks.

Syntax

DescriptionCalled when a logged event occurs. Decides whether a certain player will hear it. By default all admins see log messages.
Syntax
GAMEMODE:CanSeeLogMessage(Player ply, string text, Color Color)
ReturnsCanSeeLogMessage (boolean): whether the player will see this log message.

Arguments

  • ply (Player)
  • The player to receive the message

  • text (string)
  • The text of the log message

  • Color (Color)
  • The color of the log message

    Examples

    DescriptionDonators can see log messages
    Code
    hook.Add("CanSeeLogMessage", "example", function(ply, text, colour)
     
    	if ply:GetNWString("usergroup") == "donator" then
    		return true
    	end
    	-- Return nothing otherwise to take the default 
    end)
    OutputDonators seeing log messages