Deny pickup weapon twice

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

Deny pickup weapon twice

Post by dot » Thu Nov 01, 2018 5:16 am

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 20 times
Last edited by dot on Thu Nov 01, 2018 11:31 pm, edited 1 time in total.

Qwerty
Masterful
Posts: 686
Joined: Wed Mar 12, 2008 7:14 pm
Personal rank: I.T Master
Location: New York
Contact:

Re: Deny pickup weapon twice

Post by Qwerty » Thu Nov 01, 2018 1:10 pm

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 ROSEBUM ROCKET-X RB

dot
Average
Posts: 53
Joined: Tue Oct 30, 2018 3:41 am

Re: Deny pickup weapon twice

Post by dot » Thu Nov 01, 2018 1:43 pm

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

Fix pickup enforcer for double enforcer.

Post Reply