script works perfect, adds 1 each time until i am literally out of firing range, you have other scripts conflicting?
edit ok i see the issue is the always active command, turn it on - p.s. your original script works fine already when always on
1 last edit, if you change the hp check a little it does work as i expected without needing to be always active (although it's still better to keep it always active due to the extra range if you can)
local counted = 0
function ammocount_init(e)
SetEntityHealth(e,10)
end
function ammocount_main(e)
if g_Entity[e]['health'] <= 1 then
if counted == 0 then
counted = 1
Ammo = Ammo + 1
Accuracy = Score / Ammo
end
SetEntityHealth(e,10)
else
counted = 0
end
end
life\'s one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11