RAHE Boosting
::
Import & overrides
In rahe-boosting root directory create a file called imports.lua, in which copy-paste the following code:
local isServer = IsDuplicityVersion()
local appId = 'rahe-boosting'
if isServer then
CreateThread(function()
while GetResourceState("fd_laptop") ~= "started" do
Wait(500)
end
local added, errorMessage = exports.fd_laptop:addCustomApp({
id = appId,
name = "Boosting",
isDefaultApp = true,
needsUpdate = false,
icon = 'boosting.svg',
ui = ("https://cfx-nui-%s/tablet/nui/index.html"):format(GetCurrentResourceName()),
keepAlive = true,
windowActions = {
isResizable = false,
isMaximizable = false,
isClosable = true,
isMinimizable = true,
isDraggable = false
},
windowDefaultStates = {
isMaximized = true,
isMinimized = false
},
onUseServer = function(source)
SetTimeout(1000, function()
TriggerClientEvent("rahe-boosting:client:openTablet", source)
end)
end,
})
if not added then
print("Could not add app:", errorMessage)
end
end)
end
if not isServer then
function SetNuiFocus(hasCursor, disableInput) end
function SendNUIMessage(data)
if data.action == 'showMenu' or data.action == 'hideMenu' then
return
end
exports.fd_laptop:sendAppMessage(appId, data)
end
end Edit fxmanifest.lua
At the root of rahe-boosting directory open fxmanifest.lua file with your preferred file editor and add imports.lua to shared_scripts block. After edit, shared_scripts block should look like this:
shared_scripts {
'config/shared.lua',
'config/translations.lua',
'@ox_lib/init.lua',
'imports.lua'
} Restart / Start server
Once you completed steps above, restart or start your server and enjoy RAHE Boosting while using our laptop.