TebexDiscordYouTubeTwitch
  • 👋Introduction
  • Information
    • 💬Discord Roles
    • 🔐FiveM Asset Escrow
    • 🤝Support Plans
    • 🌐Showcase Server
    • ⁉️Frequently Asked Questions
    • ⭐Staff & Beta Tester Applications
  • Paid Resources
  • 🛡️PHYLAX AC
  • 🔫BetterFight Evolved
    • 📚About BFE
      • 💁‍♀️Features
        • 🎯Recoil System
        • 💢Crosshair System
        • 🔥Temperature System & Jamming
        • 🔫Weapon Damages
        • 🎥ViewCam Enforcer
        • ♨️Triggerbot System
        • 🦘Jump Spam & Roll Prevention
        • 🥢Remove Whipping & Melee One Shot Prevention
      • 🔁Dependencies & Compatibility
      • ⚡Optimization
      • 🛡️Security
      • 🔐Encryption - FiveM Escrow
      • 🆕Changelogs
    • ⚙️Configuration Settings
      • ⚙️Master Config
      • ⚙️Weapons Config
      • ⚙️Security Config
      • ⚙️Discord Logs Config
    • ⤵️Base Installation
    • ⬅️Exports
  • 🏪Store Robberies Evolved
    • 📚About SRE
      • 💁‍♀️Features
        • 👨‍💼AI Shopkeeper System
          • 🗣️Tasks & Behaviors
          • 🤠Character Manipulation
        • 🔫Realistic Robbery Mechanics
        • 🚨Security Systems and Measures
        • 🛠️Customizable Store Configuratins
      • 🔁Dependencies & Compatibility
      • ⚡Optimization
      • 🛡️Security
      • 🔐Encryption - FiveM Escrow
      • 🆕Changelogs
    • ⚙️Configuration Settings
      • ⚙️Master Config
      • ⚙️Stores Config
        • ⚙️Global Store Settings
        • ⚙️Individual Store Settings
          • ⚙️Main Settings
          • ⚙️Polyzone Settings
          • ⚙️Shopkeeper Settings
          • ⚙️Stealable Settings
          • ⚙️Security Settings
      • ⚙️AI NPC Config
        • ⚙️Shopkeeper Character Settings
        • ⚙️Shopkeeper Animation List
        • ⚙️Shopkeeper Speech List
      • ⚙️Player Speech List
      • ⚙️Security Config
      • ⚙️Discord Logs Config
    • ⤵️Base Installation
    • 🛡️Security Integration
    • ⬅️Exports
  • 👁️HawkEye Surveillance
    • 📚About HES
      • 💁‍♀️Features
        • 📹CCTV Cameras
        • 🌐Jammers & Tracker
        • 🛠️Dynamic Configurations
      • 🔁Dependencies & Compatibility
      • ⚡Optimization
      • 🛡️Security
      • 🔐Encryption - FiveM Escrow
      • 🆕Changelogs
    • ⚙️Configuration Settings
      • ⚙️Master Config
      • ⚙️Camera & Jammer Config
        • ⚙️Items
        • ⚙️Camera Settings
      • ⚙️Security Config
      • ⚙️Discord Logs Config
    • ⤵️Base Installation
    • 🛡️Security Integration
    • ⬅️Exports
  • 🏦Pacific Bank Robbery
    • 📚About PBR
      • 💁‍♀️Features
        • 👨‍👩‍👦Ped Handler & Security Guards
        • 💡Vault Breaching Methods
        • 🔒Laser Security System
        • 💰Stealables & Robbery Mechanics
        • 🚪Doorlocks & Alarm System
        • 🖥️Server Synchronization
        • 🛠️Extensive Configurations
      • 🔁Dependencies & Compatibility
      • ⚡Optimization
      • 🛡️Security
      • 🔐Encryption - FiveM Escrow
      • 🆕Changelogs
    • ⚙️Configuration Settings
      • ⚙️Master Config
      • ⚙️Bank Config
      • ⚙️Security Config
      • ⚙️Discord Logs Config
    • ⤵️Base Installation
    • ⬅️Exports
  • 🏦Paleto Bank Robbery
    • 📚About PBR
      • 💁‍♀️Features
        • 👨‍👩‍👦Ped Handler & Security Guards
        • 💡Vault Breaching Methods
        • 🪛Locker Drilling
        • 💰Stealables & Robbery Mechanics
        • 🚪Doorlocks & Alarm System
        • 🖥️Server Synchronization
        • 🛠️Extensive Configurations
      • 🔁Dependencies & Compatibility
      • ⚡Optimization
      • 🛡️Security
      • 🔐Encryption - FiveM Escrow
      • 🆕Changelogs
    • ⚙️Configuration Settings
      • ⚙️Master Config
      • ⚙️Bank Config
      • ⚙️AI NPC Config
      • ⚙️Security Config
      • ⚙️Discord Logs Config
    • ⤵️Base Installation
    • ⬅️Exports
  • 🚘The Complete Vehicle System
    • 📙About TCVS
      • 💁‍♀️Features
      • 🔁Dependencies & Compatibility
      • ⚡Optimization
      • 🛡️Security
      • 🔐Encryption - FiveM Escrow
      • 🆕Changelogs
    • ⤵️Base Installation
    • ⚙️Configuration Settings
      • ⚙️Master Config
      • ⚙️Security Config
      • ⚙️Discord Logs Config
      • ⚙️Public Garages Config
      • ⚙️Private Garages Config
      • ⚙️Impound Config
      • ⚙️Insurance Config
      • ⚙️Parts Config
      • ⚙️Locksystem Config
      • ⚙️Trackers Config
      • ⚙️Vehicle Info Config
    • 🚗Vehicle Shop Integration
    • 👨‍🔧Mechanic Integration
    • 🛡️Security Integration
    • 🚀Snippets
      • ⭕QB-RadialMenu
    • ⬅️Exports
Powered by GitBook
On this page

Was this helpful?

  1. The Complete Vehicle System
  2. Snippets

QB-RadialMenu

Explore snippets made by the community and developers for you to utilize within TCVS.

PreviousSnippetsNextExports

Last updated 1 year ago

Was this helpful?

If you are utilizing and want to incorporate impound/garages/insurance through it, then this section will help you incorporate it with written code by Cisoko.

CLIENT-SIDED

First, ensure you comment out the sections highlighted in the provided photo to avoid conflicts. Additionally, insert a Citizen.Wait(1000) to prevent crashes when entering the PolyZone.

The specified code is located at client/publicGarages.lua

This code needs to be incorporated directly within TCVS, specifically inside the client/publicGarages.lua file. This addition will introduce two options when entering a garage PolyZone and remove those Public Garages options upon exiting the PolyZone.

RegisterNetEvent('TCVS:client:store')
AddEventHandler('TCVS:client:store', function()
    if(globalPlayerVehicle ~= 0)then
        local plate = GetVehicleNumberPlateText(globalPlayerVehicle)
        plate = string.gsub(plate, " ", "")
        local isPlayerInsideGaragePoly, polyType, garageID = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
                    
        if(isPlayerInsideGaragePoly and polyType == "garage-public")then
            exports['realisticVehicleSystem']:StoreVehicleInGarage(garageID + 10000, plate)
        end
    end
end)

RegisterNetEvent('TCVS:client:form')
AddEventHandler('TCVS:client:form', function(garageID, owner)
        local isPlayerInsideGaragePoly, polyType, garageID = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
                    
        if(isPlayerInsideGaragePoly and polyType == "garage-public")then
            exports['realisticVehicleSystem']:SetupGarageForm(garageID)
        end
    end
end)

Citizen.CreateThread(function()

    local radialmenu, radialmenu2

    while vehicleList == nil or Config == nil do
        Citizen.Wait(100)
    end

    while true do
        Citizen.Wait(500)
        local isPlayerInsideGaragePoly, polyType, garageID = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
                
        if(isPlayerInsideGaragePoly and polyType == "garage-public")then
            if not radialmenu then
                radialmenu = exports['qb-radialmenu']:AddOption({
                    id = 'store_in_garage',
                    title = 'Store in Garage',
                    icon = 'car',
                    type = 'client',
                    event = 'TCVS:client:store',
                    shouldClose = true
                })
            end
            if not radialmenu2 then
                radialmenu = exports['qb-radialmenu']:AddOption({
                    id = 'open_garage',
                    title = 'Open Garage',
                    icon = 'car',
                    type = 'client',
                    event = 'TCVS:client:form',
                    shouldClose = true
                })
            end
        else
            if radialmenu then
                exports['qb-radialmenu']:RemoveOption(radialmenu)
                radialmenu = nil
            end
            if radialmenu2 then
                exports['qb-radialmenu']:RemoveOption(radialmenu2)
                radialmenu2 = nil
            end
        end
    end
end)

CLIENT-SIDED

First, ensure you comment out the sections highlighted in the provided photos to avoid conflicts. Additionally, insert a Citizen.Wait(1000) to prevent crashes when entering the PolyZone.

The specified code is located at client/impound.lua

This code needs to be incorporated directly within TCVS, specifically inside the client/impound.lua file. This addition will introduce two options when entering a impound related PolyZone and remove the options upon exiting the PolyZones.

RegisterNetEvent('TCVS:client:impoundLock')
AddEventHandler('TCVS:client:impoundLock', function()
    local isPlayerInsideImpoundPoly, polyType = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
    if(isPlayerInsideImpoundPoly and polyType == "impound-lock") then
        exports['realisticVehicleSystem']:SetupImpoundLockForm(localisedUnlockImpoundID)
    end
end)

RegisterNetEvent('TCVS:client:impoundRetrieve')
AddEventHandler('TCVS:client:impoundRetrieve', function()
    local isPlayerInsideImpoundPoly, polyType = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
    if(isPlayerInsideImpoundPoly and polyType == "impound-retrieve") then
        exports['realisticVehicleSystem']:SetupImpoundRetrieveForm(localisedImpoundID)
    end
end)

Citizen.CreateThread(function()
    local radialmenuImpoundLock, radialmenuImpoundRetrieve
    
    while true do
        Citizen.Wait(500)
        local isPlayerInsideImpoundLockPoly, polyTypeLock = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
        local isPlayerInsideImpoundRetrievePoly, polyTypeRetrieve = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
        
        if(isPlayerInsideImpoundLockPoly and polyTypeLock == "impound-lock") then
            if not radialmenuImpoundLock then
                radialmenuImpoundLock = exports['qb-radialmenu']:AddOption({
                    id = 'impound_lock',
                    title = 'Lock Vehicle',
                    icon = 'lock',
                    type = 'client',
                    event = 'TCVS:client:impoundLock',
                    shouldClose = true
                })
            end
        else
            if radialmenuImpoundLock then
                exports['qb-radialmenu']:RemoveOption(radialmenuImpoundLock)
                radialmenuImpoundLock = nil
            end
        end
        
        if(isPlayerInsideImpoundRetrievePoly and polyTypeRetrieve == "impound-retrieve") then
            if not radialmenuImpoundRetrieve then
                radialmenuImpoundRetrieve = exports['qb-radialmenu']:AddOption({
                    id = 'impound_retrieve',
                    title = 'Retrieve Vehicle',
                    icon = 'car',
                    type = 'client',
                    event = 'TCVS:client:impoundRetrieve',
                    shouldClose = true
                })
            end
        else
            if radialmenuImpoundRetrieve then
                exports['qb-radialmenu']:RemoveOption(radialmenuImpoundRetrieve)
                radialmenuImpoundRetrieve = nil
            end
        end
    end
end)

CLIENT-SIDED

First, ensure you comment out the sections highlighted in the provided photo to avoid conflicts. Additionally, insert a Citizen.Wait(1000) to prevent crashes when entering the PolyZone.

The specified code is located at client/insurance.lua

This code needs to be incorporated directly within TCVS, specifically inside the client/insurance.lua file. This addition will introduce the option when entering an insurance PolyZone and remove the options upon exiting the PolyZone.

RegisterNetEvent('TCVS:client:insurance')
AddEventHandler('TCVS:client:insurance', function()
    local isPlayerInsideInsurancePoly, polyType = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
    if(isPlayerInsideInsurancePoly and polyType == "insurance") then
        exports['realisticVehicleSystem']:SetupInsuranceForm(localisedInsuranceID)
    end
end)

Citizen.CreateThread(function()
    local radialmenuInsurance
    
    while true do
        Citizen.Wait(500)
        local isPlayerInsideInsurancePoly, polyType = exports['realisticVehicleSystem']:IsPlayerInsidePoly()
        
        if(isPlayerInsideInsurancePoly and polyType == "insurance") then
            if not radialmenuInsurance then
                radialmenuInsurance = exports['qb-radialmenu']:AddOption({
                    id = 'insurance',
                    title = 'Insurance',
                    icon = 'briefcase-medical',
                    type = 'client',
                    event = 'TCVS:client:insurance',
                    shouldClose = true
                })
            end
        else
            if radialmenuInsurance then
                exports['qb-radialmenu']:RemoveOption(radialmenuInsurance)
                radialmenuInsurance = nil
            end
        end
    end
end)
🚘
🚀
⭕
qb-radialmenu
Impound Retrieve
Impound Lock