Garry's Mod

Garry's Mod

28 ratings
Transfer Ownership
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Roleplay
File Size
Posted
Updated
9.006 KB
17 Jul, 2017 @ 12:40pm
24 Nov, 2024 @ 1:05am
4 Change Notes ( view )

Subscribe to download
Transfer Ownership

Description
This addon requires that you're using a prop protection addon that is CPPI compliant
Examples of popular prop protection addons which are CPPI compliant:

Allows players to transfer ownership of selected entities to another player.
The ownership transfer can be undone using the "Undo" button in-game

Use the convar transfer_ownership_check_ownership to choose whether to check strictly against the owner of the prop (1) or if the player has permission to use toolgun on the prop (0). The latter is useful for cases where you want the players to change the ownership of their friends props.

The convar transfer_ownership_admin_check_ownership is the same as above, but only applies to admins so that admins can change ownership of players props or disconnected players props. This convar is ignored if the above is set to 0.

The convar transfer_ownership_admin_usergroup sets which usergroup that should take advantage of the above admin check.
E.g. transfer_ownership_admin_usergroup "superadmin" allows only superadmins (and on ULX, exsto and AssMod any group that inherits from it. "admin" and "superadmin" will use the IsAdmin and IsSuperAdmin checks respectively.)

Source Code
The source code is available on GitHub[github.com] and is released under the GNU Affero General Public License v3 (AGPL-3.0)[github.com]

Bug reporting/Suggestions
Any bugs/errors/suggestions should be posted on GitHub[github.com], I will not be looking at the workshop comments often.
10 Comments
☮shift☮ 17 Jul, 2020 @ 10:28pm 
big pp addon
☮shift☮ 11 Aug, 2019 @ 7:11am 
can you trasfer owner to world ?
Polp Retsim 14 Aug, 2017 @ 3:59pm 
Ohhh that's a nice thing to hear !
Thanks and good job ! I'll try it when I got time to :)
Rynoxx  [author] 13 Aug, 2017 @ 12:38pm 
@Mister.Plop There we go, updated and at least during my testing it works with Simfphys cars now :D
It works with both primary and secondary fire :steamhappy:
Polp Retsim 9 Aug, 2017 @ 8:36am 
@Rynoxx Okay nice, thanks :)
Rynoxx  [author] 9 Aug, 2017 @ 6:58am 
@Mister.Plop Ok, I've updated the github with some code that should solve the issue. However I haven't had the opportunity to test it in-game yet.
I'll see if I get time to test it later today and if I do, I'll update the workshop with a simphys compatible version :)
Polp Retsim 9 Aug, 2017 @ 2:09am 
@Rynoxx Yeah he right click, it works pretty well but not so much with simfphys based cars. The player can actually pick up his items
But no matter what, if the "original" owner disconnects, the wheels disappear, and the seats too. I mean, we can't get into the car no more , but it's still there as a prop
Rynoxx  [author] 9 Aug, 2017 @ 12:33am 
@Mister.Plop Try using the secondary fire feature to transfer all entities constrained to the car. Otherwise try doing each wheel separately. If that doesn't work I'll see if I can take a look at it
Polp Retsim 7 Aug, 2017 @ 6:31am 
Oh, seems when I transfer a simfphys car to a player and then disconnects, the wheels disappear and we can't drive anymore
Polp Retsim 7 Aug, 2017 @ 6:17am 
Thanks for this pal.
Works perfectly well, does what it says.