Editable Files

Server

tgiCore.VersionCheck('tgiann-core', '4.17.0')

if config.open.command.active then
    tgiCore.CommandsAdd(config.open.command.command, LANG.COMMAND_DESC, {}, false, function(source, args)
        TriggerClientEvent("tgiann-vehiclecontrol:openMenu", source)
    end)
end

if config.seatCommand.active then
    tgiCore.CommandsAdd(config.seatCommand.command, LANG.SEAT_COMMAND_DESC, { { name = "seat", help = LANG.SEAT_COMMAND_HELP } }, false, function(source, args)
        TriggerClientEvent("tgiann-vehiclecontrol:changeSeat", source, tonumber(args[1]) or 1)
    end)
end

Client

function disableControlActions()
    SetPauseMenuActive(false)
    DisableControlAction(0, 24, true) -- disable attack
    DisableControlAction(0, 25, true) -- disable aim
    DisableControlAction(0, 1, true)  -- LookLeftRight
    DisableControlAction(0, 2, true)  -- LookUpDown

    DisableControlAction(0, 1, true)
    DisableControlAction(0, 2, true)
end

---@param vehicle number
---@return boolean
function beforeEngineAction(vehicle)
    return true
end

Last updated