From Official DarkRP Wiki
|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 name||Entity:OwnedBy(Player player)|
|Returns true if the door is owned by the player supplied.|
|Part of Library:||Entity|
|Description||Checks if the player is admin and the door owner before removing it.|
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
- Will return true if the player is a co-owner of the door too.