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

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. [Support] Throwing knife refil

[Support] Throwing knife refil

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
3 Posts 2 Posters 119 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.
  • ImVeryTwistedundefined Offline
    ImVeryTwistedundefined Offline
    ImVeryTwisted
    wrote on last edited by Mr. Android
    #1

    does anybody have a gsc script to refill throwing knives?
    I understand how to do it (get the weapon type and if ammo type is 0 give 2) but Im not sure how to implementing this without create a infinite loop that gets called on onplayerspawned

    1 Reply Last reply
    0
    • InactUsr791undefined Offline
      InactUsr791undefined Offline
      InactUsr791
      wrote on last edited by
      #2

      put this in onPlayerConnect

      player thread TomahawkRefill();
      

      put this anywhere

      TomahawkRefill() {
      	self endon("disconnect");
      	self waittill( "spawned_player" );
      	
      	for(;;) {
      		self waittill( "grenade_fire",grenade,weaponName );
      
      		if(weaponName == "hatchet_mp")
      			self giveMaxAmmo( "hatchet_mp" );
      
      		wait 0.5;
      	}
      }
      

      should work!

      1 Reply Last reply
      0
      • ImVeryTwistedundefined Offline
        ImVeryTwistedundefined Offline
        ImVeryTwisted
        wrote on last edited by
        #3

        Cheers my g

        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