Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Setweaponammostock issue with claymore

Setweaponammostock issue with claymore

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
3 Posts 2 Posters 98 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • chasef7undefined Offline
    chasef7undefined Offline
    chasef7 Banned
    wrote on last edited by
    #1

    Hello, im having an issue with this script. It still adds claymores to the stock. Can anyone help me fix this? Thanks

    	if( self GetCurrentWeapon() != "claymore_zm" ) 
    		{
    			stockcount = self getweaponammostock( self GetCurrentWeapon() );
    			self setWeaponAmmostock( self GetCurrentWeapon(), stockcount + 1 );
    			wait 0.9;
    		}
    
    JezuzLizardundefined 1 Reply Last reply
    0
    • JezuzLizardundefined Offline
      JezuzLizardundefined Offline
      JezuzLizard Plutonium Staff
      replied to chasef7 on last edited by
      #2

      chasef7 GetCurrentWeapon() will only return "claymore" if the player is holding the claymore in their hands. You need to use self getweaponslist() which ignores equipment and tacticals and lethals.

      chasef7undefined 1 Reply Last reply
      0
      • chasef7undefined Offline
        chasef7undefined Offline
        chasef7 Banned
        replied to JezuzLizard on last edited by chasef7
        #3

        JezuzLizard yeah but the script only runs on the current weapon anyway so im a bit confused why it ignores the if statement. all good.

        1 Reply Last reply
        0

        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Donate