UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: Dust on April 18, 2014, 08:07:18 pm

Title: Hopefully last question with my custom perk
Post by: Dust on April 18, 2014, 08:07:18 pm
Okay this is hopefully going to be my last question before i get the perk fully working. I have 2 custom perks and they both have the same problem. When i buy the perk it does its effect, (gives me double points on the double points perk and gives me ammo on the ammomatic perk) but when i go to knife my knife suddenly becomes 1 hit even on round 7, i dont understand whats wrong, here is my ammomatic perk script

Code Snippet
Plaintext
check_for_ammo_regen()
{
  while( 1 )
  {
    players = getplayers();
    for( j=0; j<players.size; j++ )
    {
      if( players[j] HasPerk( "specialty_leadfoot" ) )
      {
        player_weapons = players[j] GetWeaponsListPrimaries();
        for( k=0; k<player_weapons.size; k++ )
        {
          max_ammo = WeaponMaxAmmo( player_weapons[k] );
          current_ammo = players[j] GetWeaponAmmoStock( player_weapons[k] );
          if( current_ammo < max_ammo )
            players[j] SetWeaponAmmoStock( player_weapons[k], current_ammo + 5 );
iprintln("The ammo perk is working");
        }
      }
    }
    wait( 5 );
  }
  }


Just noticed i put it in the wrong place. can a mod move this please
Title: Re: Hopefully last question with my custom perk
Post by: YaPh1l on April 18, 2014, 08:43:48 pm
Search through your files if you used specialty_leadfood somewhere else too.

- Phil.
Title: Re: Hopefully last question with my custom perk
Post by: Dust on April 18, 2014, 08:47:01 pm
Search through your files if you used specialty_leadfood somewhere else too.

- Phil.

That was the problem, apparently leadfoot was used in zombiemode_spawner, as increased melee damage, never put that there though so must of been treyarch