ItsMods

Full Version: Gungame Mod
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, this is my first try to make a mod for mw2 so please don't be harsh Smile
I won't share just yet the mod because it need cleaning i only have a video uploaded to show you what i made Smile

Some of the features:
  • Perk Streak
  • Knife Downgrade but not upgrading killer's gun
  • Showing what next weapon is, who is the leader etc.


I dont know if you have solved it, but you have to remove the guns that drop to the ground after you die, because if not players will pick them.
there is a checker that check's the current weapon of the player, if is not the weapon he must have it removes it and give him the weapon of that level
How could one disable the drops anyway?
You can make the weapon be deleted in some seconds like:
file: _weapons.gsc
PHP Code:
deletePickupAfterAWhile()
{
    
self endon("death");
    
    
wait 60;

    if ( !
isDefinedself ) )
        return;

    
self delete();


or you can disable dropping here:

PHP Code:
dropWeaponForDeathattacker )
{
    
weapon self.lastDroppableWeapon;
    
    if ( 
isdefinedself.droppedDeathWeapon ) )
        return;

    if ( 
level.inGracePeriod )
        return;
    
    if ( !
isdefinedweapon ) )
    {
        /
#
        
if ( getdvar("scr_dropdebug") == "1" )
            
println"didn't drop weapon: not defined" );
        
#/
        
return;
    }
    
    if ( 
weapon == "none" )
    {
        /
#
        
if ( getdvar("scr_dropdebug") == "1" )
            
println"didn't drop weapon: weapon == none" );
        
#/
        
return;
    }
    
    if ( !
self hasWeaponweapon ) )
    {
        /
#
        
if ( getdvar("scr_dropdebug") == "1" )
            
println"didn't drop weapon: don't have it anymore (" weapon ")" );
        
#/
        
return;
    }
    
    if ( 
weapon != "riotshield_mp" )
    {
        if ( !(
self AnyAmmoForWeaponModesweapon )) )
        {
            /
#
            
if ( getdvar("scr_dropdebug") == "1" )
              
println"didn't drop weapon: no ammo for weapon modes" );
            
#/
            
return;
        }

        
clipAmmoR self GetWeaponAmmoClipweapon"right" );
        
clipAmmoL self GetWeaponAmmoClipweapon"left" );
        if ( !
clipAmmoR && !clipAmmoL )
        {
            /
#
            
if ( getdvar("scr_dropdebug") == "1" )
              
println"didn't drop weapon: no ammo in clip" );
            
#/
            
return;
        }
  
        
stockAmmo self GetWeaponAmmoStockweapon );
        
stockMax WeaponMaxAmmoweapon );
        if ( 
stockAmmo stockMax )
            
stockAmmo stockMax;

        
item self dropItemweapon );
        
item ItemWeaponSetAmmoclipAmmoRstockAmmoclipAmmoL );
    }
    else
    {
        
item self dropItemweapon );    
        if ( !
isDefineditem ) )
            return;
        
item ItemWeaponSetAmmo11);
    }

    /
#
    
if ( getdvar("scr_dropdebug") == "1" )
        
println"dropped weapon: " weapon );
    
#/

    
self.droppedDeathWeapon true;

    
item.owner self;
    
item.ownersattacker attacker;

    
item thread watchPickup();

    
item thread deletePickupAfterAWhile();

    
detach_model getWeaponModelweapon );

    if ( !
isDefineddetach_model ) )
        return;

    if( 
isDefinedself.tag_stowed_back ) && detach_model == self.tag_stowed_back )
        
self detach_back_weapon();

    if ( !
isDefinedself.tag_stowed_hip ) )
        return;

    if( 
detach_model == self.tag_stowed_hip )
        
self detach_hip_weapon();

I use disablePlayerUse(<player>) or enablePlayerUse() to disable pickup only for some players (it works the same way as trigger_use)
Well, i believe it's better to disable weapon drop because it causes less data consuming, like there are less object on the world for the script to care about! Smile
But the entities are deleted after 60 seconds.
even 1-2 objects are consuming memory not much but they do consume some!