Jump to content

Exclude Objects with Skin / OwnerID

Pending 3.1.4

RuGRustServer
RuGRustServer

Posted

Hi @Steenamaroo,

 

is it possible to make a little change, so decorative collectibles do not grant RP ?

As you can see, the DeployableNature Plugin uses Skin-IDs for their collectibles.

 

Currently i made this small extra in your hook:

void OnCollectiblePickup(CollectibleEntity entity, BasePlayer player) 
		{
			if (!loaded || player == null || entity == null || !conf.Settings.Rewards.PickupReward)
				return;
			//Disable Rust Rewards for collectibles with skin (DeployableNature)
			if (entity.skinID != 0)
				return;
				
			if (conf.Settings.Rewards.Use_Permissions && !HasPerm(player.UserIDString, PickupPermission))
				return;
			if (UsedIDs.Contains(entity.net.ID.Value))
				return;

			UsedIDs.Add(entity.net.ID.Value);
			if (conf.RewardTypes.Pickup.ContainsKey(entity.ShortPrefabName))
				GiveReward(player, RewardType.Pickup, conf.RewardTypes.Pickup[entity.ShortPrefabName], entity);
		}

 

Unbenannt.PNG

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.6k

Files Sold

Total number of files sold.

2.1m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.