DarkRP.Player.Arrest

From Official DarkRP Wiki
Jump to navigation Jump to 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 functions.
Function
Function name Player:Arrest(number time, boolean rejoin)
Description:
Arrests the player with the given time or the default jailing time.
Returns: nil
Part of Library: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Player.Arrest]Player:Arrest[/url][/b]

Examples

DescriptionArrests all players for default jail time
Used onNewerShared.png
Code
function ArrestAll( )
	for k, v in pairs(player.GetAll()) do
   		v:Arrest()
	end
end
OutputN/A


Additional Notes

  • The rejoin argument is used by the function, it forces the arrest and teleports the player to jail even if they are already arrested.
  • If time is set to nothing, the arrest function will use the default time.
  • You can call it like this, Player:Arrest() without the arguments.