Deny pickup weapon twice

Search, find and discuss about Mutators!
Post Reply
dot
Average
Posts: 59
Joined: Tue Oct 30, 2018 3:41 am

Deny pickup weapon twice

Post by dot »

Small mutator for disable pickup weapon if you already have one.

Intended fix collect weapons by others players if you die on MH server.
Usually on MH servers ammo increase automatically, so you do not need collect weapon or ammo. Exclude WarHead.
But if you die and your weapons collected it can be pity for you.

Mutator written maximally compatible and must work with any others.
It must be first in chain for properly work.

Code: Select all

class DenyPickupWeaponTwice extends Mutator;

function bool HandlePickupQuery(Pawn Other, Inventory item, out byte bAllowPickup) {
	Local Weapon weap;
	if (item.isA('Weapon')) {
		weap = Weapon(Other.FindInventoryType(item.Class));
		if (weap != None) {
			bAllowPickup = 0;
			if (item.isA('WarHeadLauncher') && weap.AmmoType != None && weap.AmmoType.AmmoAmount < weap.AmmoType.MaxAmmo) bAllowPickup = 1;
			if (item.isA('Enforcer') && !weap.isA('DoubleEnforcer')) bAllowPickup = 1;
			if (bAllowPickup == 0) return true;
		}
	}
   return super.HandlePickupQuery(Other, item, bAllowPickup);
}
DenyPickupWeaponTwice2.zip
(1.35 KiB) Downloaded 43 times
Last edited by dot on Thu Nov 01, 2018 11:31 pm, edited 1 time in total.
RocketJedi
Inhuman
Posts: 850
Joined: Wed Mar 12, 2008 7:14 pm
Personal rank: I.T Master
Location: New York
Contact:

Re: Deny pickup weapon twice

Post by RocketJedi »

thanks! I will check it out.
https://www.vulpinemission.com
Image ROCKET-X8 Server
Image MONSTERHUNT w/ NALI WEAPONS 3 + RX8
Image BUNNYTRACK NY
Image SNIPER DEATHMATCH
Image InstaGib + ComboGib + Jailbreak
Image ROSEBUM ROCKET-X RB
dot
Average
Posts: 59
Joined: Tue Oct 30, 2018 3:41 am

Re: Deny pickup weapon twice

Post by dot »

I forgot mention about WarHeadLauncher. It is collectable until you not get max ammo for it.

Fix pickup enforcer for double enforcer.
Post Reply