DarkRP.Entity.IsOwned

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:IsOwned()
Description:
Returns true or false depending on if it owned or not.
Returns: boolean
Part of Library: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Entity.IsOwned]Entity:IsOwned[/url][/b]

Examples

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


Additional Notes

  • Will flag an error on unownable doors.