DarkRP.Entity.IsDoor

From DarkRP
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 Entity:IsDoor()
Description:
Checks if the entity is a door.
Returns: boolean
Part of Library: Entity
Realm:
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Entity.IsDoor]Entity:IsDoor[/url][/b]

Examples[edit]

DescriptionRemoves all doors.
Used on
Code
for _, ent in ipairs(ents.GetAll()) do
	if ent:IsDoor() then
		ent:Remove()
	end
end
OutputN/A


Additional Notes[edit]

  • Doors that get picked up are: func_door, func_door_rotating, prop_door_rotating and prop_dynamic.