Lua [ARZ]AutoBikeMotoRunSwimOnMaxSpeed - ARIZONA EDITION

Th3Creat0r

Известный
37
5
Lua:
script_name("AutoBicycleRunSwimOnMaxSpeed - ArizonaEdition")
script_author("histor")
script_version("1.0")

KEY = {
    ['bike'] = VK_LSHIFT,
    ['bmx'] = VK_1,
}
function main()
    cars = {}
    local vehs = io.open(getGameDirectory() .. '/data/vehicles.ide','r+')
    for l in (vehs:read('*a')):gmatch('[^\n]+') do
        if l:find('%d+,%s+%S+%s+%S+,%s+%S+,%s+%S+,') then
            local id,name,type,gameName = l:match('(%d+),%s+(%S+),%s+%S+,%s+(%S+),%s+(%S+),')
            table.insert(cars,{id=tonumber(id),name=name,type=type,gameName=gameName})
        end
    end
    while true do wait(0)

        if isCharInAnyCar(PLAYER_PED) then
            local veh = storeCarCharIsInNoSave(playerPed)
            for k,v in pairs(cars) do
                if v.id == getCarModel(veh) then
                    local types = {
                        ['bike'] = VK_UP,
                        ['bmx'] = VK_W,
                    }
                    if types[v.type] ~= nil and type(types[v.type]) == 'number' and isKeyDown(KEY[v.type]) and isKeyCheckAvailable() then
                        setVirtualKeyDown(types[v.type],true)
                        wait(50--[[ЗАДЕРЖКА]])
                        setVirtualKeyDown(types[v.type],false)
                    end
                end
            end
        end

    end
end

function isKeyCheckAvailable()
    if not isSampLoaded() then
        return true
    end
    if not isSampfuncsLoaded() then
        return not sampIsChatInputActive() and not sampIsDialogActive()
    end
    return not sampIsChatInputActive() and not sampIsDialogActive() and not isSampfuncsConsoleActive()
end
Ты потерял код для ускорения пешком или в воде