DarkRP.Entity.IsOwnable

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:IsOwnable()
Description:
Checks if the entity is a ownable. The function checks if it is a door and if entity is a vehicle with the owning of vehicles enabled.
Returns: boolean
Part of Library: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Entity.IsOwnable]Entity:IsOwnable[/url][/b]

Examples

DescriptionPrints "I can buy this, $$$!" if the entity is ownable.
Used onNewerServer.png
Code
if myent:IsOwnable() == true then
	print("I can buy this, $$$!")
else
	print("Better close your wallet richo!")
end
OutputN/A


Additional Notes

  • Function checks if vehicle owning is enabled. Even if it is a vehicle it will return false when vehicle owning is disabled!
  • The door check is not a call to Entity:IsDoor but rather a check if the entity's class is func_door, func_door_rotating or prop_door_rotating.