local max_shots = 10 local shots = 0 local ammo = nil local old_gun = "" function shots_fired_init(e) end function shots_fired_main(e) if g_Entity[e]['plrinzone'] == 1 then if ammo == nil or g_PlayerGunName ~= old_gun then ammo = (g_PlayerGunAmmoCount + g_PlayerGunClipCount)+shots old_gun = g_PlayerGunName return end if g_PlayerGunFired == 1 then if g_PlayerGunAmmoCount + g_PlayerGunClipCount < ammo then shots = ammo - (g_PlayerGunAmmoCount + g_PlayerGunClipCount) end if shots >= max_shots then Destroy(1) end end Prompt("shots fired = "..shots) else ammo = nil end end