|Hook name||addLaw(number index, string law, Player player)|
|Called when a law is added.|
|BBCode Link:||[b][url=http://wiki.darkrp.com/index.php?title=Hooks/Shared/addLaw]addLaw hook[/url][/b]|
- index (number)
- law (string)
- player (Player)
Index of the law
The player who added the law
This hook does not accept return values. You can still return a value to override the default implementation of this hook.
hook.Add("addLaw", "headdalaw", function(index, law, player) print(player .. " " .. "added a law! \n" .. law) end)
Result: Quang added a law! RDM is not allowed.