DarkRP.Entity.IsOwnable
Jump to navigation
Jump to 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: |
![]() |
BBCode Link: | [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Entity.IsOwnable]Entity:IsOwnable[/url][/b] |
Examples[edit]
Description | Prints "I can buy this, $$$!" if the entity is ownable. |
---|---|
Used on | ![]() |
Code | if myent:IsOwnable() == true then
print("I can buy this, $$$!")
else
print("Better close your wallet richo!")
end
|
Output | N/A |
Additional Notes[edit]
- 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.