Combreal icon

ammo.lua

Combreal | PRO | 02/07/14 10:19:34 AM UTC | 0 ⭐ | 1116 👁️ | Never ⏰ | []
Lua |

740 B

|

None

|

0 👍

/

0 👎

-- For Unlimited ammo --
 
function GetRequiredVersion()
    return 200
end
 
 
function OnScriptLoad(processid, game, persistent) end
 
function OnPlayerSpawnEnd(player, m_objectId)
 
    registertimer(1000, "InfiniteAmmo", player)
 
end
 
 
function InfiniteAmmo(id, count, player)
 
    local m_player = getplayer(player)
    if m_player then
        local objId = readdword(m_player, 0x34)
        local m_object = getobject(objId)
        if m_object then
            for i = 0,3 do
                local weapId = readdword(m_object, 0x2F8 + (i * 4))
                local m_weapon = getobject(weapId)
                if m_weapon then
                    writeword(m_weapon, 0x2B6, 9999)
                    writeword(m_weapon, 0x2B8, 9999)
                    updateammo(weapId)
                end
            end
 
            return true
        end
    end
 
    return false
end

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎