ENT.Base = "base_ai"
ENT.Type = "ai"
ENT.RenderGroup = RENDERGROUP_BOTH
ENT.AutomaticFrameAdvance = true
ENT.PrintName = "Freilassungs-NPC"
ENT.Spawnable = true
ENT.Category = "Mapobjekte"
ENT.UnarrestPrice = 4000
ENT.UnarrestTime = 5

function ENT:SetupDataTables()
	self:NetworkVar("Float", 0, "EndUse")
	self:NetworkVar("Entity", 0, "UsePlayer")
	
	if SERVER then
		self:SetEndUse(0)
	end
end

function ENT:PhysgunPickup(ply)
	return !GetConVar("mg_movemode") or GetConVar("mg_movemode"):GetInt() > 1 and ply:IsAdmin() or GetConVar("mg_movemode") and GetConVar("mg_movemode"):GetInt() > 0 and ply:IsSuperAdmin()
end

function ENT:CanTool(ply, trace, mode)
	return !GetConVar("mg_movemode") or GetConVar("mg_movemode"):GetInt() > 1 and ply:IsAdmin() or GetConVar("mg_movemode") and GetConVar("mg_movemode"):GetInt() > 0 and ply:IsSuperAdmin()
end
