[Support] Throwing knife refil

Topic created · 3 Posts · 33 Views
  • 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

  • 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!

  • Cheers my g

Log in to reply