Deny pickup weapon twice

Search, find and discuss about Mutators!

Deny pickup weapon twice

Postby 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 11 times
Last edited by dot on Thu Nov 01, 2018 11:31 pm, edited 1 time in total.
dot
Average
 
Posts: 52
Joined: Tue Oct 30, 2018 3:41 am

Re: Deny pickup weapon twice

Postby Qwerty » Thu Nov 01, 2018 1:10 pm

thanks! I will check it out.
http://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
Qwerty
Masterful
 
Posts: 656
Joined: Wed Mar 12, 2008 7:14 pm
Location: New York
Personal rank: I.T Master

Re: Deny pickup weapon twice

Postby 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.
dot
Average
 
Posts: 52
Joined: Tue Oct 30, 2018 3:41 am


Return to Mutators

Who is online

Users browsing this forum: No registered users and 2 guests