Remove all but chat from console
#7
Since you don't want to be notified of this on your console, how do you feel about a new sound to alert you that your mag is low?
Something like the "RELOAD" voice on the Area51 arcade game. XD
Then your script would look more like this:
autoreload 0
alias low_on_ammo 0
alias checkready 1
alias ammocheck [
if (&& (&& (= (curweapon) 1) (<= (magcontent (curweapon)) 2)) $checkready) [alias low_on_ammo 1] [] // pistol
if (&& (&& (= (curweapon) 2) (<= (magcontent (curweapon)) 3)) $checkready) [alias low_on_ammo 1] [] // carbine
if (&& (&& (= (curweapon) 3) (<= (magcontent (curweapon)) 1)) $checkready) [alias low_on_ammo 1] [] // shotgun
if (&& (&& (= (curweapon) 4) (<= (magcontent (curweapon)) 6)) $checkready) [alias low_on_ammo 1] [] // SMG
if (&& (&& (= (curweapon) 5) (<= (magcontent (curweapon)) 1)) $checkready) [alias low_on_ammo 1] [] // sniper
if (&& (&& (= (curweapon) 6) (<= (magcontent (curweapon)) 5)) $checkready) [alias low_on_ammo 1] [] // AR
if (&& (&& (= (curweapon) 9) (<= (magcontent (curweapon)) 4)) $checkready) [alias low_on_ammo 1] [] // akimbo
if (&& $low_on_ammo $checkready) [sound 99; alias checkready 0; alias low_on_ammo 0]
sleep 0 [ammocheck]
]
You'd need to make your own "Low on ammo" sound file (or get a really nice person to make one for you) and place it in the appropriate folder, registering it in sounds.cfg (not difficult).
Assuming it is registered as sound number 99 (the only custom sound you've registered), the above code will remain correct.
You will also need to bind reload to the same key as
alias checkready 1
And add "ammocheck" to your native alias mapstartalways.

(BTW, DrMental, "magcontent" requires the weapon number as a direct argument, i.e.,
showammo = [if (> (magcontent (curweapon)) 7) [] [reload]]
Thanks given by:


Messages In This Thread
Remove all but chat from console - by DEKiMA - 10 Oct 10, 03:46AM
RE: Remove all but chat from console - by Anannyo - 10 Oct 10, 03:46AM
RE: Remove all but chat from console - by V-Man - 13 Oct 10, 07:09AM