13 Oct 10, 07:09AM
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:
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
And add "ammocheck" to your native alias mapstartalways.
(BTW, DrMental, "magcontent" requires the weapon number as a direct argument, i.e.,
Something like the "RELOAD" voice on the Area51 arcade game. XD
Then your script would look more like this:
[SELECT ALL] Code:
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]
]
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
[SELECT ALL] Code:
alias checkready 1
(BTW, DrMental, "magcontent" requires the weapon number as a direct argument, i.e.,
[SELECT ALL] Code:
showammo = [if (> (magcontent (curweapon)) 7) [] [reload]]