DarkRP.Entity.GetDoorOwner

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:GetDoorOwner()
Description:
Returns the door owner.
Returns: Player
Part of Library: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Entity.GetDoorOwner]Entity:GetDoorOwner[/url][/b]

Examples

DescriptionSends a message to the door owner saying that a player wants to own their door.
Used onNewerServer.png
Code
function WantsToOwn( ply, door )
	if door:AllowedToOwn( ply ) then
		door:GetDoorOwner():ChatPrint( ply:Nick() .. " wants to own your door too!" )
	end
end
OutputN/A


Additional Notes

  • Will return nil if there is no door owner.
  • Can sometimes return owners that have disconnected recently.