UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: DeletedUser on December 26, 2020, 07:11:00 pm

Title: how to remove starting grenades. [SOLVED]
Post by: DeletedUser on December 26, 2020, 07:11:00 pm
hi i am trying to remove the starting grenades. i had a look at the loodout gsc file and ive removed the starting gun but i cant see how to remove the grenades.

only mention of grenades is for the player to be able to throw a grenade back.

SOLVED by TheRevenantSkull

in _zombiemode.gsc
```
award_grenades_for_survivors()
{
    players = get_players();

    for (i = 0; i < players.size; i++)
    {
        if (!players
.is_zombie)
       {
           if( !players
HasWeapon( "stielhandgranate" ) )
           {
               players
GiveWeapon( "stielhandgranate" );    
               players
SetWeaponAmmoClip( "stielhandgranate", 0 );
           }

           if ( players
GetFractionMaxAmmo( "stielhandgranate") < .25 )
           {
               players
SetWeaponAmmoClip( "stielhandgranate", 0 ); // [2 is default] i changed it to 0 so player(s) start without any grenades on person. You will also not get any for each new round.
           }
           else if (players
GetFractionMaxAmmo( "stielhandgranate") < .5 )
           {
               players
SetWeaponAmmoClip( "stielhandgranate", 3 );
           }
           else
           {
               players
SetWeaponAmmoClip( "stielhandgranate", 4 );
           }
       }
   }
}
```
**you will still get grenades with max ammo.**