DarkRP.PlayerWarranted

From DarkRP
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[edit]

DescriptionCalled when the cops get a search warrant
Syntax
GAMEMODE:PlayerWarranted(Player ply, Player target, string reason)
Returnsnil

Arguments

  • ply (Player)
  • The player who gave the warrant status

  • target (Player)
  • The player that got warrant

  • reason (string)
  • The reason for the warrant

    Examples[edit]

    Descriptionlogs warrant reasons
    Code
    hook.Add( "PlayerWarranted", "warrant", function(ply, target, reason)
    	ply:ChatPrint(ply:Nick() .. " got a warrant for " .. target:Nick())
    	print("Wanted reason: ", reason)
    end)
    
    OutputA print message