Configuration

  • To change locales check locales/ folder (Note: we use ox_lib locales)

Bridge Guide

  • Change the values according to the resources you use.

Notes:

  • The resource are preconfigured with below provided scripts, if you have any other resource you want to be configured you can reach us on discord.

  • Also check fxmanifest.lua there are some comments

Framework

Below are some pre configured frameworks for Phone

Note: This script can be easily configured with other frameworks.

Garages

Below are some pre configured garages for Garage App

If you are using any of the mentioned garages below then you need to add the code given in the garage script

xn-garages (add in any shared file)

-- xn-garages (xn-garages/server/open.lua)
local function getGarage(garage)
    return Config.Garages[garage] or Config.HouseGarages[garage] or Garages[garage] or HouseGarages[garage]
end
exports('getGarage', getGarage)

jg-advancedgarages (add in any shared file)

local function getGarage(garage)
    return Config.GarageLocations[garage] or Config.ImpoundLocations[garage] or Config.JobGarageLocations[garage] or Config.GangGarageLocations[garage]
end
exports('getGarage', getGarage)

qb-garage (JonasDev) (add in qb-garages/server/main.lua at very end)

local function getGarage(garage)
    return Config.Garages[garage] or Config.HouseGarages[garage]
end
exports('getGarage', getGarage)

qb-garage (JonasDev) (add in qb-garages/client/main.lua at very end)

local function requestVehicle(data)
    local vehicle, plate, garage, fuel, engine, body, coords in data
    local vehicleInfo = { vehicle = vehicle, plate = plate, garage = garage, fuel = fuel, engine = engine, body = body }
    local location, heading = vec3(coords.x, coords.y, coords.z), coords.w
    local p = promise.new()
    QBCore.Functions.TriggerCallback('qb-garage:server:spawnvehicle', function(netId, properties)
        while not NetworkDoesNetworkIdExist(netId) do Wait(10) end
        local veh = NetworkGetEntityFromNetworkId(netId)
        UpdateSpawnedVehicle(veh, vehicleInfo, heading, {}, properties)
        p:resolve(veh)
    end, vehicleInfo, location, heading, false)
    SetTimeout(5000, function()
        if p then p:reject(nil) end
    end)
    return Citizen.Await(p)
end
exports('RequestVehicle', requestVehicle)

qb-garages (default) (add in qb-garages/server/main.lua at very end)

local function getGarage(garage)
    return Config.Garages[garage]
end
exports('getGarage', getGarage)

qb-garages (default) (add in qb-garages/client/main.lua at very end)

local function requestVehicle(data)
    local vehicle, plate, fuel, engine, body, coords in data
    local stats = { engine = engine, body = body }
    local p = promise.new()
    QBCore.Functions.TriggerCallback('qb-garages:server:spawnvehicle', function(netId, properties, vehPlate)
        while not NetworkDoesNetworkIdExist(netId) do Wait(10) end
        local veh = NetworkGetEntityFromNetworkId(netId)
        Citizen.Await(CheckPlate(veh, vehPlate))
        QBCore.Functions.SetVehicleProperties(veh, properties)
        exports[Config.FuelResource]:SetFuel(veh, fuel)
        TriggerServerEvent('qb-garages:server:updateVehicleState', 0, vehPlate)
        TriggerEvent('vehiclekeys:client:SetOwner', vehPlate)
        if Config.Warp then TaskWarpPedIntoVehicle(PlayerPedId(), veh, -1) end
        if Config.VisuallyDamageCars then doCarDamage(veh, stats, properties) end
        SetVehicleEngineOn(veh, true, true, false)
        p:resolve(veh)
    end, plate, vehicle, coords, false)
    SetTimeout(5000, function()
        if p then p:reject(nil) end
    end)
    return Citizen.Await(p)
end
exports('RequestVehicle', requestVehicle)

Inventory

Below are some pre configured inventories for Phone

Housing

Below are some pre configured housing scripts for Properties App

qbx_properties (add in qbx_properties/server/property.lua) at very bottom

lib.callback.register('qbx_properties:callback:getCurrentPropertyId', function(source)
    local propertyId = enteredProperty[source]
    return propertyId
end)

Banking

Below are some pre configured banking scripts for Bank App

codem-banking (add in codem-bank/server/utility.lua) at very bottom

exports('fetchLimitedTransactions', function(source)
    local src = source
    local identifier = GetIdentifier(src)
    local data = playerAllData[identifier]
    if not data then return false end
    local transactions, count = {}, 0
    for i = #data.notificationdata, 1, -1 do
        if count > 10 then break end
        transactions[#transactions+1] = data.notificationdata[i]
        count += 1
    end
    return transactions
end)

Target

Below are some pre configured targeting system for Phone

Voice

Below are some pre configured voice system for Calling App

Sounds

Below are some pre configured sound resources for Audio Playing

  • interact-sound

  • xsound

interact-sound

  • Add the .ogg files from snappy-phone/[README] to interact-sound/client/html/sounds

xsound

  • Add the .ogg files from snappy-phone/[README] to xsound/html/sounds

  • Head over to xsound/config.lua and do as shown below.

config.interact_sound_enable = true -- changed from false -> true

Last updated