DarkRP.Entity.AllowedToOwn

From Official DarkRP Wiki
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:AllowedToOwn(Player ply)
Description:
Returns true or false depending on if the player has been given ownership rights.
Returns: boolean
Part of Library: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Entity.AllowedToOwn]Entity:AllowedToOwn[/url][/b]

Examples

DescriptionPrints to the owner of the door that ply wants to own the door.
Used onNewerShared.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

  • This is not a check for door ownership ban function.