📕
fmid Documentation
  • fmid Documentation
  • 🚘 fmid_garasi (2023)
    • client
    • Integrasi
    • Additional Commands
    • Pembuatan Garasi
    • Hooks
  • ♻️ fmid_loop
    • Contoh Penggunaan 1
  • 🔳fmid_poly
    • Getting Started
    • Usage
  • fmid_garasi 2.0
    • client
    • server
      • exports
      • commands
    • data
  • 🧠fmid_secure
    • Getting Started
    • Client
    • Server
  • fmid_split
    • Setup
  • 💃fmid_danceroom
    • External Script
    • Internal Script
    • Commands
  • 🧛fmid_ko
    • Internal
    • Integrasi
    • ox_lib Additional
  • 🔫pubg-hud
    • Integrasi ox_inventory
    • Integrasi ox_lib
    • Internal Script
Powered by GitBook
On this page
  1. ♻️ fmid_loop

Contoh Penggunaan 1

contoh basic, fmid_loop + ox_lib

local aktif = false

-- Contoh Loop Default
CreateThread(function()
    while true do
        aktif = false
        if GetVehiclePedIsIn(PlayerPedId(), false) then
            if IsControlJustPressed(0, 38) then
                aktif = true
            end
        end
        Wait(0)
    end
end)

-- dengan fmid_loop + ox_lib
loop.create('klakson', function()
    aktif = true
end)

klakson = lib.addKeybind({
    name = 'klakson',
    description = 'test loop',
    defaultKey = 'E',
    onPressed = function(self)
        if cache.vehicle then
            loop.start('klakson')
        end
    end,
    onReleased = function(self)
        loop.stop('klakson')
        aktif = false
    end
})

klakson:disable(true)

lib.onCache('vehicle', function(b)
    klakson:disable(not b)
end)
Previous♻️ fmid_loopNextfmid_poly

Last updated 1 year ago