UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Thundergun receiving ammo from vulture ammo drops?

broken avatar :(
Created 11 years ago
by ProRevenge
0 Members and 1 Guest are viewing this topic.
1,462 views
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 5 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
Signature
Stranded
Nacht Der Untoten: Reimagined
Encampment
Encampment V2: BO3 Mod

Mapper and Weapon Porter - I release what I can of my work for the community to enjoy :)
×
ProRevenge's Groups
Mapper Has released one or more maps to the UGX-Mods community.
ProRevenge's Contact & Social LinksProRevenge
I am trying to make it so the Thundergun does not get ammo from the drops, as it would be OP, and I have tried using a getcurrent weapon with Thundergun, then saying no ammo, but it stops all guns with under 10 clip size getting ammo, this is the script I am using: (Harry's)

Code Snippet
Plaintext
		{
owner playSound( "vulture_pickup" );

current_weapon = owner getCurrentWeapon();

                        if ( current_weapon != "thundergun" || current_weapon != "thundergun_upgraded" )
{
     current_ammo = owner getWeaponAmmoStock( current_weapon );
     weapon_max = weaponMaxAmmo( current_weapon );
     clip = WeaponClipSize( current_weapon );
     clip_add = int( clip / 10 );
     if ( clip_add < 1 )
clip_add = 0;

     new_ammo = current_ammo + clip_add;
     if ( new_ammo > weapon_max )
new_ammo = weapon_max;

     owner SetWeaponAmmoStock( current_weapon, new_ammo );
//========================================================================================
                             current_weapon = owner getCurrentWeapon();
 
                             primaryWeapons = owner GetWeaponsListPrimaries();
                             for ( x = 0; x < primaryWeapons.size; x++ )
                                  {
        if( primaryWeapons[ x ] == owner GetCurrentWeapon() )
        owner SetClientDvar( "hud_player_ammo_weapon", owner GetWeaponAmmoClip( primaryWeapons[ x ] ) + "/" + owner GetWeaponAmmoStock( primaryWeapons[ x ] ) );
          }
//=================================================================================================
                        }
                        else
{
    current_ammo = owner getWeaponAmmoStock( current_weapon );
    weapon_max = weaponMaxAmmo( current_weapon );
    clip = WeaponClipSize( current_weapon );
    clip_add = int( clip / 10 );
    if ( clip_add < 1 )
clip_add = 1;

    new_ammo = current_ammo + clip_add;
    if ( new_ammo > weapon_max )
new_ammo = weapon_max;

    owner SetWeaponAmmoStock( current_weapon, new_ammo );
//========================================================================================
                            current_weapon = owner getCurrentWeapon();
 
                            primaryWeapons = owner GetWeaponsListPrimaries();
                            for ( x = 0; x < primaryWeapons.size; x++ )
                                 {
          if( primaryWeapons[ x ] == owner GetCurrentWeapon() )
          owner SetClientDvar( "hud_player_ammo_weapon", owner GetWeaponAmmoClip( primaryWeapons[ x ] ) + "/" + owner GetWeaponAmmoStock( primaryWeapons[ x ] ) );
         }
//=================================================================================================
                        }
self notify( "grabbed" );
self delete();
break;
The bits in the //=== are the Dvar to make Pwn's HUD update properly

Can someone help me with this? I want all weapons except Thundergun to get ammo.
Marked as best answer by ProRevenge 11 years ago
broken avatar :(
×
broken avatar :(
Senpai
Location: us
Date Registered: 28 September 2013
Last active: 10 months ago
Posts
602
Respect
Forum Rank
Zombie Enslaver
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
arceus's Groups
Box Mappers Elite
Box Mappers Elite
arceus's Contact & Social LinksarceusNT

Code Snippet
Plaintext
		{
owner playSound( "vulture_pickup" );

current_weapon = owner getCurrentWeapon();

                        if ( current_weapon != "thundergun" || current_weapon != "thundergun_upgraded" )
{
    current_ammo = owner getWeaponAmmoStock( current_weapon );
    weapon_max = weaponMaxAmmo( current_weapon );
    clip = WeaponClipSize( current_weapon );
    clip_add = int( clip / 10 );
    if ( clip_add < 1 )
clip_add = 1;

    new_ammo = current_ammo + clip_add;
    if ( new_ammo > weapon_max )
new_ammo = weapon_max;

    owner SetWeaponAmmoStock( current_weapon, new_ammo );
//========================================================================================
                            current_weapon = owner getCurrentWeapon();
 
                            primaryWeapons = owner GetWeaponsListPrimaries();
                            for ( x = 0; x < primaryWeapons.size; x++ )
                                 {
          if( primaryWeapons[ x ] == owner GetCurrentWeapon() )
          owner SetClientDvar( "hud_player_ammo_weapon", owner GetWeaponAmmoClip( primaryWeapons[ x ] ) + "/" + owner GetWeaponAmmoStock( primaryWeapons[ x ] ) );
         }
//=================================================================================================
                        }
self notify( "grabbed" );
self delete();
break;

there that should work :P
Last Edit: July 25, 2015, 03:05:13 pm by arceus
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 5 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Mapper Has released one or more maps to the UGX-Mods community.
ProRevenge's Contact & Social LinksProRevenge
This didn't work, The Thundergun still receives ammo  :-\

Edit, the fix you told me in Chat worked, change the  ||  to &&
Last Edit: July 25, 2015, 04:28:50 pm by ProRevenge

 
Loading ...