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
Thanks to @pedjas for bug report ( http://youtu.be/SWU5MkfJLz8 )
(NEW)Full maps\mp\gametypes\_weapons.gsc HERE
or add manually this funcion:
After
in maps\mp\gametypes\_weapons.gsc
hope you like it
I hope nobody done this before me, I used the search button and I didnt found nothing like this
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();
hope you like it
My Reputation is low, help me with +1 rep if i helped you!