
/*
    Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
    Version: v1.7.8 (stable)
*/

AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
function ENT:Initialize()
	self:SetModel("models/Humans/Group01/Female_02.mdl")
	self:SetHullType(HULL_HUMAN)
	self:SetHullSizeNormal()
	self:SetNPCState(NPC_STATE_SCRIPT)
	self:SetSolid(SOLID_BBOX)
	self:SetUseType(SIMPLE_USE)
end
function ENT:Use(activator)
	if Realistic_Police.CheckJailPos() then 
		RPTTableBailer = RPTTableBailer or {}
		for k ,v in pairs(RPTTableBailer) do 
			if not IsValid(RPTTableBailer[k]["vEnt"]) or not timer.Exists("rpt_timerarrest"..RPTTableBailer[k]["vEnt"]:EntIndex()) then
				print(RPTTableBailer[k]["vEnt"])
				RPTTableBailer[k] = nil 
			end 
		end
-- 76561198219964944

		if #RPTTableBailer != 0 then 
			net.Start("RealisticPolice:HandCuff")
				net.WriteString("Bailer")
				net.WriteTable(RPTTableBailer)
			net.Send(activator)
		else 
			Realistic_Police.SendNotify(activator, Realistic_Police.GetSentence("noArrestedPlayer"))
		end 
	else 
		Realistic_Police.SendNotify(activator, Realistic_Police.GetSentence("noJailPositions"))
	end 
end 
function ENT:OnTakeDamage()
    return 0
end


