ScubeScripts-Docs

Note: This page is not yet finished, there are still some errors in the system. If you find a mistake, please report it to us.

Introduction

ScubeScripts is a small group of developers creating open source resources for FiveM. We place a high priority on quality, security, performance, and stability. The official documentation for all resources developed by the ScubeScripts team can be found on this website. If you notice any inconsistencies in the documentation or have suggestions for improvements, please contact us via the contact page.

Our Team

ScubeScripts consists of a small team of amateur and professional programmers. We enjoy developing free and open-source resources and sharing them with the community. However, we invest a lot of time and effort into maintaining and supporting these projects. Our team members volunteer their time to keep everything running. You're welcome to take a closer look at their work or show your appreciation by supporting us.

Lumpii404

Lumpii404

I am the founder of ScubeScripts - a passionate frontend and HUD developer with a focus on performance & design.

SkullCode

SkullCode

I'm rarely there, I mainly work on the performance and stability of the systems.

Prototyp666

Prototyp666

I bring creative ideas to the team and push the other two to their limits.

Our Best Projects

Our Recommendation

Overextended

Overextended

View Profile
MyScripts

MyScripts

View Profile

sc_textUI Standalone

client.lua
server.lua
Replace
Download

Show UI with text and key


exports.sc_textUI:showUI(key, message)

-- example

exports.sc_textUI:showUI("E", "Press to interact")
                      

Hide UI


exports.sc_textUI:hideUI()
                      

Example script (client.lua)


if distance < 5.0 then
    DrawMarker(1, marker.x, marker.y, marker.z - 1.0, 0, 0, 0, 0, 0, 0, 1.0, 1.0, 0.5, 36, 144, 218, 0.8, false, true, 2, nil, nil, false)
    if distance < 1.0 then
        exports.sc_textUI:showUI("E", "Press to interact")
        if IsControlJustPressed(0, 38) then
            exports.sc_textUI:hideUI()
            TriggerServerEvent('sc_lc:checkJobAndOpenMenu')
        end
    else
        exports.sc_textUI:hideUI()
    end
else
end
                      

Show UI with text and key


TriggerClientEvent("sc_textUI:showUI", playerId, key, message)

-- example

TriggerClientEvent("sc_textUI:showUI", playerId, "E", "Press to interact")
                  

Hide UI


TriggerClientEvent("sc_textUI:hideUI", playerId)
                  
Tip: If you have any problems with the installation, please contact our support team.

If you want to replace the standard ESX notification with ours, you need to change the following:

Replace the entire code here esx_textui/TextUI.lua with:


Debug = ESX.GetConfig().EnableDebug
local isShowing = false
                    
---@param message string
local function TextUI(message)
    isShowing = true
    local key, text = message:match("%[(%w)%]%s*(.*)")
                    
    if not key then
        key = "default"
        text = message
    end
                    
    exports.sc_textUI:showUI(key, text)
end
                    
local function HideUI()
    if not isShowing then
        return
    end
    isShowing = false
    exports.sc_textUI:hideUI()
end
                    
exports("TextUI", TextUI)
exports("HideUI", HideUI)
ESX.SecureNetEvent("ESX:TextUI", TextUI)
ESX.SecureNetEvent("ESX:HideUI", HideUI)
                    
if Debug then
    RegisterCommand("textui:test", function()
        TextUI("Press [E] to use")
    end, false)
                    
    RegisterCommand("textui:hide", function()
        HideUI()
    end, false)
end
                        

sc_progress Standalone

client.lua
server.lua
Download

Show UI with text and key


exports.sc_progress:showNUI(time, message)

-- example

exports.sc_progress:showNUI(5000, "Loading...")
                      

Example script (client.lua)


function startSearching(time, dict, anim, cb)
    local ped = GetPlayerPed(-1)
    canSearch = false

    RequestAnimDict(dict)
    while not HasAnimDictLoaded(dict) do
        Citizen.Wait(0)
    end

    exports.sc_progress:showNUI(time, Translation[Config.Locale]['search'])
    TaskPlayAnim(ped, dict, anim, 8.0, 8.0, time, 1, 1, 0, 0, 0)

    Wait(time)
    ClearPedTasks(ped)
    canSearch = true
    TriggerServerEvent(cb)
end
                      

Show UI with text and key


TriggerClientEvent("sc_progress:showNUI", playerId, time, message)

-- example

TriggerClientEvent("sc_progress:showNUI", playerId, 10000, "Loading...")
                      

sc_hud ESX

ui.html
script.js
Download

There's nothing here yet.

There's nothing here yet.

sc_taxsystem ESX

You caught us!
Download

There's nothing here yet.

sc_licensemanager ESX

You caught us!
Download

There's nothing here yet.

sc_dumpster ESX

You caught us!
Download

There's nothing here yet.

sc_lawn ESX

You caught us!
Download

There's nothing here yet.

sc_findatm ESX

You caught us!
Download

There's nothing here yet.

sc_jobcenter ESX

You caught us!
Download

There's nothing here yet.

sc_resell ESX

You caught us!
Download

There's nothing here yet.

sc_cartax ESXQBCore

Replace
Download

If you want to use your own billing system you have to change the following:

Search for line 24 in sc_cartax/server/server.lua

Here is an example with myBills: Replaces line 24 with: TriggerEvent('myBills:gotAnswerForBill', xPlayer.source, xPlayer.source, 'society_police', 'Car Taxes', ESX.Math.Round(tax), true, true)


if carCount > 0 then
local tax = carCount * taxMultiplier
if xPlayer ~= nil then
    xPlayer.removeAccountMoney('bank', ESX.Math.Round(tax)) -- Change this line
    for _, notifyModule in ipairs(Config.Notify) do
        if notifyModule.enabled then
            local notificationText = Translation[Config.Locale]['text'] .. tax .. Translation[Config.Locale]['text1']
            
            if notifyModule.name == "ox_lib" then
                notificationText = removeColorCodes(notificationText)
            end

            if notifyModule.name == "bulletin" then
                TriggerClientEvent('bulletin:sendAdvanced')
            elseif notifyModule.name == "default" then
                TriggerClientEvent('cartax:picturemsg', xPlayer.source, Config.Char, notificationText, Config.Name, Translation[Config.Locale]['pay_text'])
            elseif notifyModule.name == "ox_lib" then
                TriggerClientEvent('ox_lib:notify', xPlayer.source, {
                    title = Translation[Config.Locale]['pay_text'],
                    description = notificationText,
                    duration = 5000,
                    icon = 'car'
                })
            end
        end
    end
end
                        

sc_phonetax ESX

You caught us!
Download

There's nothing here yet.

sc_extinguisher ESX

You caught us!
Download

There's nothing here yet.

sc_animatedNPC Standalone

You caught us!

There's nothing here yet.

sc_notify Standalone

client.lua
server.lua
Download
Info: A new version is on the way!

Notifications

  • title = "Custom-Notify"
  • description = "Mit eigenem Icon & Position!"
  • type = "info" --success, error, info, warning
  • icon = You can use symbols from FontAwesome for custom messages
  • iconColor = "#FF00FF"
  • position = "top-right" --top, top-right, top-left, bottom, bottom-right, bottom-left, center-right, center-left
  • Duration = 15000
  • showDuration = false

  • Example

    Standard

    
    exports['sc_notify']:notify({
        title = "Standard-Notify", 
        description = "This is a standard info!",
        type = "info" --success, error, info, warning
    })
                          

    Coustom

    
    exports['sc_notify']:notify({
        title = "Custom-Notify", 
        description = "With custom icon & position!",
        icon = "rocket",
        iconColor = "#FF00FF",
        position = "top-right",
        Duration = 15000,
        showDuration = false
    })
                          

    Standard

    
    TriggerClientEvent('sc_notify:notify', targetPlayerId, {
        title = "Standard-Notify", 
        description = "This is a standard info!",
        type = "info" --success, error, info, warning
    })
                      

    Coustom

    
    TriggerClientEvent('sc_notify:notify', targetPlayerId, {
        title = "Custom-Notify", 
        description = "With custom icon & position!",
        icon = "rocket",
        iconColor = "#FF00FF",
        position = "top-right",
        Duration = 15000,
        showDuration = false
    })