Hi there, I'm trying to modify R-Remover Tool to check for the owner from the Entity Owner plugin.
Specifically here
As you can see it is calling another plugin for this, but I want to change this.Code:if (entity is BuildingBlock) { var returnhook = Interface.GetMod().CallHook("FindBlockData", new object[] { entity as BuildingBlock }); if (returnhook is string) { string ownerid = (string)returnhook; if (player.userID.ToString() == ownerid) return true; if (useRustIO && RustIOIsInstalled()) if (HasFriend(ownerid, player.userID.ToString())) return true; } }
The API from EntityOwner has these two API methods
I'm not sure where to start, and I have been searching however I'm still a novice coder and I can't find anything that helps me.Code:// Gets the name and status of the owner player // Returns null if no owner found string GetOwnerName(BaseEntity entity)// Get the BasePlayer instance (if known) of the owner player // Returns null if no owner found BasePlayer GetOwnerPlayer(BaseEntity entity)
Calling API Method
Discussion in 'Rust Development' started by TheOnlyTermin, Apr 20, 2016.
