🔴QBCore Trigger Installation

Default QBCore Core Events !

If you are using default qb-core framework follow these:

  • Open resources\[qb]\qb-core\client\functions.lua file and search the following function :

function QBCore.Functions.SetVehicleProperties(vehicle, props)

Add the following trigger at the end of the searched function:

-- Trigger the callback to get stance values
        QBCore.Functions.TriggerCallback('Garages:server:GetStanceValues', function(stance_value)
            if stance_value ~= nil then
                TriggerServerEvent('Stancer_sv:LoadStanceValues', stance_value, VehToNet(vehicle))
            end
        end, props.plate)

It should look like this :


Jim-Mechanic QBCore Core Events !

If you are using Jim-Mechanic use the following instructions !

If you are using jim-mechanic script your core event will be different in qb-core framework so you will have to follow these instructions : For reference you can check this link Jim-Mechanic !

  • Open resources\[qb]\qb-core\client\functions.lua file and search the following function :

function QBCore.Functions.SetVehicleProperties(vehicle, props)

Add the following trigger at the end of the searched function:

-- Trigger the callback to get stance values
        QBCore.Functions.TriggerCallback('Garages:server:GetStanceValues', function(stance_value)
            if stance_value ~= nil then
                TriggerServerEvent('Stancer_sv:LoadStanceValues', stance_value, VehToNet(vehicle))
            end
        end, props.plate)

It should look like this :


Script Finalization

After doing the above changes go through config.lua file to customize the script to your liking. Start/Restart the server to apply the changes and you are good to go !


Last updated