Author Topic: Neverending reload cycle for pepperbox  (Read 580 times)

/title
Anyways, I shoot my 4 barrels out. When it reloads (no infinite ammo), it keeps repeating itself, not actually loading bullets into the gun. I set my RTB ammo pref to 1. Didn't work. Same thing for 0, too. How do I end the reload to actually get the gun loaded?

te ammo preference 1 aka T+T1 style never worked since it was never implemented in, to end that forever reload... you mind telling me what kind of T+T youve got there? i dont ever usually see a T+T2 gun constantly replaying reload states constantly over a ammo glitch ( unless you still got reserves )

in that case, you might have to go into the code of the pepperbox and attempt to find the line that shows ::onReloaded
should look something like this
Code: [Select]
function PepperboxImage::onReloaded(%this,%obj,%slot)
{
   if(%obj.client.quantity["9MMrounds"] >= 1)
   {
      %obj.client.quantity["9MMrounds"] += %obj.toolAmmo[%obj.currTool];
      %obj.toolAmmo[%obj.currTool] = 0;
      %obj.playThread(2, plant);

      if(%obj.client.quantity["9MMrounds"] > %this.item.maxAmmo)
      {
%obj.client.quantity["9MMrounds"] -= %this.item.maxAmmo;
%obj.toolAmmo[%obj.currTool] = %this.item.maxAmmo;
%obj.AmmoSpent[%obj.currTool] = 0;
%obj.setImageAmmo(%slot,1);

commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>9mm <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["9MMrounds"] @ "", 1, 2, 3, 4);
return;
      }

      if(%obj.client.quantity["9MMrounds"] <= %this.item.maxAmmo)
      {
%obj.toolAmmo[%obj.currTool] = %obj.client.quantity["9MMrounds"];
%obj.AmmoSpent[%obj.currTool] = 0;
%obj.setImageAmmo(%slot,1);
%obj.client.quantity["9MMrounds"] = 0;

commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>9mm <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["9MMrounds"] @ "", 1, 2, 3, 4);
return;
      }
   }
}
and the imagename MIGHT be Peppergun/peppergunImage, thats just bushido not having enough time to CTRL + F everything and rename the image name that matches the uiName... so all you do is just get into the pepperbox's code and see if this matches with yours

if it doesnt, copy this one in to your pepperbox, then well see the results

He probably doesn't know how to code so he won't know how to do that.

You have another add-on with Script_AmmoGuns or similar ammo scripts enabled. Disable all other gun add-ons that use reloading when trying to run T+T

You have another add-on with Script_AmmoGuns or similar ammo scripts enabled. Disable all other gun add-ons that use reloading when trying to run T+T
You mean guns that have limited ammo or infinite ammo with reload? I have all the T+T weapons and skins.