Yes hi, quick question, when exactly did you intend on fixing this?
if(%obj.client.quantity["9MMrounds"] > 35)
{
%obj.client.quantity["9MMrounds"] -= %obj.AmmoSpent[%obj.currTool];
%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>10x18mm <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["9MMrounds"] @ "", 1, 2, 3, 4);
return;
}
if(%obj.client.quantity["9MMrounds"] <= 35)
{
%obj.client.exchangebullets = %obj.client.quantity["9MMrounds"];
%obj.toolAmmo[%obj.currTool] = %obj.client.exchangebullets;
%obj.setImageAmmo(%slot,1);
%obj.client.quantity["9MMrounds"] = 0;
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>10x18mm <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["9MMrounds"] @ "", 1, 2, 3, 4);
return;
}
Because I know for a fact I pmed you about it at least a few weeks before you released your new version.
In theory if the player never "Jammed the light button" to reload, this shouldn't cause a single issue. But for those (Like me) who actually take the time to reload when they are finished shooting, you will find that this is very much a broken segment.
The issue is that this will set whatever ammount of ammo you have left over to the ammo your gun has. Which means that any ammo you previously had is overwritten, and your left over ammo is automatically set to zero, as apposed to simply refilling what the gun is missing, and taking nothing more.
Granted this can be easily fixed with my code here.
if(%obj.client.quantity["9MMrounds"] >= %obj.AmmoSpent[%obj.currTool])
{
%obj.client.quantity["9MMrounds"] -= %obj.AmmoSpent[%obj.currTool];
%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>10x18mm <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["9MMrounds"] @ "", 1, 2, 3, 4);
return;
}
else if(%obj.client.quantity["9MMrounds"] < %obj.AmmoSpent[%obj.currTool])
{
%obj.client.exchangebullets = %obj.client.quantity["9MMrounds"];
%obj.toolAmmo[%obj.currTool] += %obj.client.exchangebullets;
%obj.setImageAmmo(%slot,1);
%obj.client.quantity["9MMrounds"] = 0;
commandToClient(%obj.client,'bottomPrint',"<just:right><font:impact:24><color:fff000>10x18mm <font:impact:34>\c6" @ %obj.toolAmmo[%obj.currTool] @ " / " @ %obj.client.quantity["9MMrounds"] @ "", 1, 2, 3, 4);
return;
}
What this code does differently is instead of checking if the ammount of ammo you have left over is greater than the full weapon clip size, it checks if its greator than the ammount of bullets you have actually used. This means that the first if statement is entered until you actually have to zero it out the ammo you have left over and adds that into the guns clip. Solving the issue, as I have found through testing, effectivly.
But what puzzles me the most about this is how nobody but me seems to have noticed. If you bother to check, it DOES happen. I suppose nobody has ever lived long enough to run out of ammo. But go figure, it still needs to be fixed.