concommand.Add("autowarrant", function(reason)
local ent = LocalPlayer():GetEyeTrace().Entity
if ent:IsValid() and ent:IsDoor() then
local owner = ent:getDoorOwner()
if owner:IsValid() and owner:IsPlayer() then
RunConsoleCommand("darkrp", "warrant", owner:SteamID(), reason)
end
end
end)