DarkRP.Entity.OwnedBy
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:OwnedBy(Player player) |
Description: | |
Returns true if the door is owned by the player supplied. | |
Returns: | boolean |
Part of Library: | Entity |
Realm: |
![]() |
BBCode Link: | [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Entity.OwnedBy]Entity:OwnedBy[/url][/b] |
Examples[edit]
Description | Checks if the player is admin and the door owner before removing it. |
---|---|
Used on | ![]() |
Code | if myent:OwnedBy( ply ) then
if ply:IsAdmin() then
myent:Remove()
else
ply:ChatPrint("Sorry, that feature is admin only!")
end
else
ply:ChatPrint("That's not your door!")
end
|
Output | N/A |
Additional Notes[edit]
- Will return true if the player is a co-owner of the door too.