Project Zomboid

Project Zomboid

ShowAmmoCount
29 Comments
Arnoldsaurio 22 Jun @ 5:02pm 
is it working in mp?
3dot14DeeDee 19 May @ 7:20am 
@zeromax @evad idk how to tag but, this cursor is not a mod its just a 42 build, also you can use a mod named as "advanced trajectory"
Rusty #DopeRust 23 Mar @ 12:08pm 
@CreamPie, firstly, thank you from the bottom of my heart for the awesome QoL mod, there was one in the past build i used, this is just what i was missing, so thank you for that.

On another note, wanted to let you know, and anyone that is wondering, this also works with mods, at least with the one i'm using( Advanced Trajectory's Realistic Overhaul ), gonna leave the proof below.

Screenshot: Working Proof [prnt.sc]

Awesome work, keep it going.

Cheers.
CreamPie  [author] 22 Mar @ 8:01pm 
no mod
Evad 22 Mar @ 7:22am 
What Crosshair is that CreamPie? Is that a mod?
Rootlevel 1 Feb @ 3:43pm 
@XOXANA: I am using this mod with rains firearms and it does work.
东方彩虹🌈 28 Jan @ 11:52am 
thank you baby
404exe 27 Jan @ 6:57am 
@CreamPie: YES! Thank you very much!
CreamPie  [author] 26 Jan @ 10:54pm 
maybe
XOXANA 26 Jan @ 6:44pm 
rains firearms and 93 guns compatible?
CreamPie  [author] 26 Jan @ 4:55pm 
@404exe
Added
404exe 26 Jan @ 12:15pm 
Thank you for this mod!

May I ask: Could you add an option to not only show the current ammo in the gun, but also the amount of available bullets for reload in one's inventory / bags / magazines (ammo-boxes excluded)?
CreamPie  [author] 24 Jan @ 1:43am 
Torque
Fixed
Torque 22 Jan @ 4:10pm 
I do have the mod "[B42] Carry visible generators" not sure if that was the reason just yet.
Torque 22 Jan @ 4:09pm 
I got this error when right clicking while carrying a generator.
`function: drawAmmoCount -- file: ShowAmmoCount.lua line # 119 | MOD: ShowAmmoCount
java.lang.RuntimeException: Object tried to call nil in drawAmmoCount
CreamPie  [author] 22 Jan @ 1:38pm 
I may incorporate your feedback, but,
I don't have a controller, so it's not a testable environment.
Illtor 22 Jan @ 8:22am 
@CreamPie

I tested this mod while playing split screen with my girlfriend with both of us using Xbox controllers. As of right now, only player 2 shows the ammo count and icon when aiming.

In my situation it's actually perfect, as it's meant to assist my girlfriend in improving her gunplay while I have always been comfortable with knowing my ammo count.

Thus, if there is anyone else out there who plays split screen and is wanting an ammo indicator at the present moment it will only work for player 2 on the right side of the screen. Oddly enough even in 41 there were many mods that added elements like this one that once split-screen was enabled would only show for the 2nd player.
Preman Kampung 16 Jan @ 7:44pm 
That's amazing! thank you :D
CreamPie  [author] 16 Jan @ 4:24pm 
@preman Kampung
Added Fixed Position Counter
See the Description
Preman Kampung 15 Jan @ 7:54pm 
Can you make it an option to not follow cursor but static related to player?

Reason is on Steamdeck, I can see the cursor (and ammo count) but the cursor sometime wonder elsewhere in corner of the screen. So i have to move the cursor again.

Playing on steamdeck/controller as you probably know we dont use cursor to aim.
CreamPie  [author] 9 Jan @ 2:06pm 
i dont have any error
Reisen 8 Jan @ 10:35pm 
Minor issue, but you get a log spam if you hold RMB, with say, a bag

can be fixed by checking if the held item is a weapon (isRanged is not a method of InventoryItem directly, but rather HandWeapon) by doing

local isWeapon = instanceof(weapon, "HandWeapon")
CreamPie  [author] 8 Jan @ 11:49am 
I'm not sure about that.
Try it yourself.
Illtor 8 Jan @ 11:27am 
@author

When I play with 2 players on local, will this show the ammo count for both players? I had a similar mod in build 41 that failed to show the ammo count for the 2nd player on split-screen.
ЯΞxx 7 Jan @ 12:41pm 
Thank you! This mod is beautifuly designed and it very necessary. Thanks!
WoodyDaOcas 7 Jan @ 2:34am 
thanks, working great! Managed to clear 7 boxes of shotgun shells yesterday and it helped me a lot
CreamPie  [author] 7 Jan @ 12:41am 
@Illtor
What mean?

@ЯΞxx
b41 Working
Illtor 7 Jan @ 12:31am 
Quick question friend, does this work for player 2 in split screen?
ЯΞxx 6 Jan @ 6:37pm 
is there a B41 version of it? very good!