Sign in to follow this  
Followers 0


1 post in this topic

plays a audio clue when you fire a weapon below the low ammo warning

local lastActiveWeapon = -1;
local lastAmmo = 0;

local widgetName = "bonusAmmoWarning"
local widget = {
  draw = function()

    local player = _G.getPlayer()
    if not player then return end

    local activeWeapon = player.weapons[player.weaponIndexSelected]

    if lastActiveWeapon ~= player.weaponIndexSelected then
      lastActiveWeapon = player.weaponIndexSelected
      lastAmmo = activeWeapon.ammo

    if activeWeapon.ammo < activeWeapon.lowAmmoWarning and lastAmmo > activeWeapon.ammo then
    lastAmmo = activeWeapon.ammo

_G[widgetName] = widget


sensi_ and DEZ like this

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0