DarkRP.Entity.IsDoor

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

Examples

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


Additional Notes

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