Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Pick up Claymore and C4
#1
Hi guys this is my new relese!
I hope nobody done this before me, I used the search button and I didnt found nothing like this Big Grin

Thanks to @pedjas for bug report ( http://youtu.be/SWU5MkfJLz8 )
(NEW)Full maps\mp\gametypes\_weapons.gsc HERE

or add manually this funcion:
Code:
thread watchC4AndClaymoresPickUp();

watchC4AndClaymoresPickUp()
{
    self endon("death");
    self endon("disconnect");
    self endon("equipment_found");
    
    level.pickUpRange = 55;
    i = 0;
    for(;;)
    {
            if ( isdefined( self.claymorearray[ i ].origin ) )
            {
                if( Distance( self.origin+(0,0,50), bullettrace(self.origin+(0,0,50),self.claymorearray[ i ].origin,true,self)["position"] ) == Distance( self.origin+(0,0,50), self.claymorearray[ i ].origin ) && Distance( self.origin+(0,0,50), self.claymorearray[ i ].origin ) < level.pickUpRange )
                {
                    self thread setUpPickUpEquipment( i, "claymore" );
                    self thread destroyOnDeath();
                    self notify("equipment_found");
                }
            }
            else if( isdefined( self.c4array[ i ].origin ) )        
            {
                if( Distance( self.origin+(0,0,50), bullettrace(self.origin+(0,0,50),self.c4array[ i ].origin,true,self)["position"] ) == Distance( self.origin+(0,0,50), self.c4array[ i ].origin ) && Distance( self.origin+(0,0,50), self.c4array[ i ].origin ) < level.pickUpRange )
                {
                    self thread setUpPickUpEquipment( i, "c4" );
                    self thread destroyOnDeath();
                    self notify("equipment_found");
                }
            }
            i++;
            if ( i == level.maxPerPlayerExplosives+1 )
                i=0;

            wait 0.2;
    }
}

setUpPickUpEquipment( i, equipment )
{
    self endon("death");
    self endon("disconnect");
    self endon("equipment_pickedUp");

    self setLowerMessage( self, "Press ^3[{+activate}]^7 to pick up "+equipment, undefined, 50 );
    self thread pickUpEquipment( i, equipment );
    if( equipment == "claymore" )
    {
        while( ( Distance( self.origin+(0,0,50), bullettrace(self.origin+(0,0,50),self.claymorearray[ i ].origin,true,self)["position"] ) == Distance( self.origin+(0,0,50), self.claymorearray[ i ].origin ) && Distance( self.origin+(0,0,50), self.claymorearray[ i ].origin ) < level.pickUpRange ) && isDefined(self.claymorearray[ i ]) )
        {
            wait 0.5;
        }
    } else if( equipment == "c4" )
    {
        while(  ( Distance( self.origin+(0,0,50), bullettrace(self.origin+(0,0,50),self.c4array[ i ].origin,true,self)["position"] ) == Distance( self.origin+(0,0,50), self.c4array[ i ].origin ) && Distance( self.origin+(0,0,50), self.c4array[ i ].origin ) < level.pickUpRange ) && isdefined( self.c4array[ i ].origin ) )
        {
            wait 0.5;
        }
    }
    
    self notify("lontano");
    self clearLowerMessage( self );
    self thread watchC4AndClaymoresPickUp();
}

pickUpEquipment( i, equipment )
{
    self endon("lontano");
    self endon("death");
    
    self notifyOnPlayerCommand("remove_equipment", "+activate");
    self waittill("remove_equipment");
    self notify("equipment_pickedUp");
    if ( equipment == "claymore" )
    {
        self.claymorearray[ i ] Delete();
    } else if( equipment == "c4" )
    {
        self.c4array[ i ] Delete();
    }
    self PlaySound( "ammo_crate_use" );
    self clearLowerMessage( self );
    weaponList = self GetWeaponsListAll();
    self giveMaxAmmo( equipment+"_mp" );
    self thread watchC4AndClaymoresPickUp();
}

destroyOnDeath()
{
    self endon("disconnect");
    self endon("equipment_pickedUp");
    self endon("lontano");
    
    self waittill("death");
    self clearLowerMessage( self );
}

After
Code:
thread deleteC4AndClaymoresOnDisconnect();
in maps\mp\gametypes\_weapons.gsc

hope you like it Smile
My Reputation is low, help me with +1 rep if i helped you! Big Grin
Reply

#2
thanks +rep
Reply

#3
Good idea, that should have been in otiginal game
[Image: lQDUjba.jpg]
Reply

#4
Hi

nice one...
but it has important bug Sad

when you want to pick-up c4 if you press F double time(as quickly) ,The C4 Will explode !!

pleas fix this bug

thanks.
Reply

#5
lol pretty cool idea dude :p
Reply

#6
(02-15-2012, 21:33)raminr63 Wrote: Hi

nice one...
but it has important bug Sad

when you want to pick-up c4 if you press F double time(as quickly) ,The C4 Will explode !!

pleas fix this bug

thanks.

Sad

someone can help about this bug ?!
@Yamato
@d0h!
@Puffiamo
...

Reply

#7
(02-15-2012, 21:33)raminr63 Wrote: Hi

nice one...
but it has important bug Sad

when you want to pick-up c4 if you press F double time(as quickly) ,The C4 Will explode !!

pleas fix this bug

thanks.

It's not a bug, it's a in-game shortcut.
Maybe It's scripted, I'll take a look when I get home.

@Puffiamo I'd suggest that you set the C4 weapon to an actionslot.
Reply

#8
(02-16-2012, 12:59)raminr63 Wrote:
(02-15-2012, 21:33)raminr63 Wrote: Hi

nice one...
but it has important bug Sad

when you want to pick-up c4 if you press F double time(as quickly) ,The C4 Will explode !!

pleas fix this bug

thanks.

Sad

someone can help about this bug ?!
@Yamato
@d0h!
@Puffiamo
...


Try this:
http://pastebin.com/ydThrCpn
Reply

#9
Not work...

? Sad
Reply

#10
why shouldnt it work?Sad
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Why do I use PROMOD, tactical dagger in fly out and not pick it up? yefuqing 6 4,105 04-09-2012, 15:59
Last Post: yefuqing
  possible ways to pick up cheats koil 5 2,395 01-13-2012, 06:52
Last Post: OrangePL
  Help How to pick a random weapon johamort 12 5,994 07-22-2011, 13:39
Last Post: Scripts18

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.