Jump to content

Exclude Objects with Skin / OwnerID

Pending 3.1.4

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

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.7k

Customers

Total customers served.

82k

Files Sold

Total number of files sold.

1.6m

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.