DarkRP.Player.UnownAll

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 Player:UnownAll()
Description:
Unowns all the player's entities and doors.
Returns: nil
Part of Library: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Player.UnownAll]Player:UnownAll[/url][/b]

Examples

DescriptionUnowns all entities on player's disconnect.
Used onNewerServer.png
Code
function pDiscon( ply )
	ply:UnownAll()
	--Notice: This is just example material, this function is called by DarkRP anyway
end
hook.Add( "PlayerDisconnected", "playerdisconnected", pDiscon )
OutputN/A


Additional Notes

  • All owned doors get unlocked and unowned.
  • Most entities remove themselves after the owner has been set to nil.
  • Usually called when the player disconnects.