DarkRP.PlayerWanted

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 someone is not wanted anymore (by someone else)
Syntax
GAMEMODE:PlayerWanted(Player ply, Player target, string reason)
Returnsnil

Arguments

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

  • target (Player)
  • The player that got wanted

  • reason (string)
  • The reason for the wanted

    Examples[edit]

    Descriptionlogs wanted reasons
    Code
    hook.Add( "PlayerWanted", "wanted", function(ply, target, reason)
    	ply:ChatPrint(ply:Nick() .. " wanted " .. target:Nick())
    	print("Wanted reason: ", reason)
    end)
    
    OutputA print message