![]() |
|
Preview Gungame Mod - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: Preview Gungame Mod (/Thread-Preview-Gungame-Mod.html) |
Gungame Mod - Howl3r - 08-03-2013 Hello, this is my first try to make a mod for mw2 so please don't be harsh ![]() I won't share just yet the mod because it need cleaning i only have a video uploaded to show you what i made ![]() Some of the features:
RE: Gungame Mod - Yamato - 08-03-2013 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. RE: Gungame Mod - Howl3r - 08-03-2013 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 RE: Gungame Mod - DidUknowiPwn - 08-03-2013 How could one disable the drops anyway? RE: Gungame Mod - Howl3r - 08-03-2013 You can make the weapon be deleted in some seconds like: file: _weapons.gsc PHP Code: deletePickupAfterAWhile()
{
self endon("death");
wait 60;
if ( !isDefined( self ) )
return;
self delete();
}
or you can disable dropping here: PHP Code: dropWeaponForDeath( attacker )
{
weapon = self.lastDroppableWeapon;
if ( isdefined( self.droppedDeathWeapon ) )
return;
if ( level.inGracePeriod )
return;
if ( !isdefined( weapon ) )
{
/#
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 hasWeapon( weapon ) )
{
/#
if ( getdvar("scr_dropdebug") == "1" )
println( "didn't drop weapon: don't have it anymore (" + weapon + ")" );
#/
return;
}
if ( weapon != "riotshield_mp" )
{
if ( !(self AnyAmmoForWeaponModes( weapon )) )
{
/#
if ( getdvar("scr_dropdebug") == "1" )
println( "didn't drop weapon: no ammo for weapon modes" );
#/
return;
}
clipAmmoR = self GetWeaponAmmoClip( weapon, "right" );
clipAmmoL = self GetWeaponAmmoClip( weapon, "left" );
if ( !clipAmmoR && !clipAmmoL )
{
/#
if ( getdvar("scr_dropdebug") == "1" )
println( "didn't drop weapon: no ammo in clip" );
#/
return;
}
stockAmmo = self GetWeaponAmmoStock( weapon );
stockMax = WeaponMaxAmmo( weapon );
if ( stockAmmo > stockMax )
stockAmmo = stockMax;
item = self dropItem( weapon );
item ItemWeaponSetAmmo( clipAmmoR, stockAmmo, clipAmmoL );
}
else
{
item = self dropItem( weapon );
if ( !isDefined( item ) )
return;
item ItemWeaponSetAmmo( 1, 1, 0 );
}
/#
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 = getWeaponModel( weapon );
if ( !isDefined( detach_model ) )
return;
if( isDefined( self.tag_stowed_back ) && detach_model == self.tag_stowed_back )
self detach_back_weapon();
if ( !isDefined( self.tag_stowed_hip ) )
return;
if( detach_model == self.tag_stowed_hip )
self detach_hip_weapon();
}
RE: Gungame Mod - 23Furious - 08-04-2013 I use disablePlayerUse(<player>) or enablePlayerUse() to disable pickup only for some players (it works the same way as trigger_use) RE: Gungame Mod - Howl3r - 08-04-2013 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!
RE: Gungame Mod - DidUknowiPwn - 08-04-2013 But the entities are deleted after 60 seconds. RE: Gungame Mod - Howl3r - 08-04-2013 even 1-2 objects are consuming memory not much but they do consume some! |