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

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.4m
Total downloads
Customers
10.8k
Customers served
Files Sold
155.7k
Marketplace sales
Payments
3.3m
Processed total
×
×
  • 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.