FWB STUDIO
Visit Store
  • Fwb Studios
    • 👋Welcome to FWB STUDIOS
      • FWB STUDIOS
    • ❓Common Questions
    • ⬆️How to Get Updates On Scripts
  • FiveM Escrow Errors
    • 🛠️ERRORS
      • ⚠️Is my error caused by FiveM escrow system?
      • ❓Failed to verify protected resource
      • ❓What steps should be taken if there are still errors?
  • How To Do This
    • 🛠️Install FwB Scripts
      • 5️ESX/QB Installation
  • FS SCRIPTS
    • 🌉Bridge
      • 📋Installation
      • Logs Setup
      • Integration
        • 📖Client_Override
        • 📖Server_Override
      • ❗Common Issues
    • 💳Fraud System
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • 📖Integrations
      • ❗Common Issues
    • 👠Skitz
      • 📖[ESX/QB] Config Files
      • 📖Unlocked FIle
      • 📋Installation
      • ⚒️Functions/Exports
      • ❗Common Issues
    • 🦱Weave Wear
      • 📖[ESX/QB] Config Files
      • 📖Unlocked FIle
      • 📋Installation
      • ⚒️Functions/Exports
      • ❗Common Issues
    • ⌛Safezone Creator
      • 📖[ESX/QB] Config Files
      • 📖Unlocked FIle
      • 📋Installation
      • ❗Common Issues
    • 🍌Useable Foods
      • 📋Installation
      • ❗Common Issues
    • 🍕Pizza Shop
      • 📖[ESX/QB] Config
      • 📋Installation
      • 📖Integrations
      • ❗Common Issues
    • 🍔Burger Shop
      • 📖[ESX/QB] Config
      • 📋Installation
      • 📖Integrations
      • ❗Common Issues
    • 📱Trap Phone
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • 📖Integrations
      • ❗Common Issues
    • 🚗Carwipe
      • 📖[ESX/QB] Config Files
      • 📄Send Vehicle Garage
      • 📖Unlocked FIle
      • 📋Installation
      • 📖Exports
      • ❗Common Issues
    • 📦Placeables
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • Money As Item in Ox Inventory
      • 📖Integrations
      • 🧾Exports / Functions
      • ❗Common Issues
    • 🚬Smoking
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • 📖Integrations
      • 🧾Exports / Functions
      • ❗Common Issues
    • 🌱White Widow
      • 📖[ESX] ALL Configs Files
      • 📖[QBCore] ALL Config Files
      • 📋Installation
      • 📖Integrations
      • 🧾Exports / Functions
      • ❗Common Issues
    • 👕Clothing As Item
      • 📖[ESX] ALL Configs Files
      • 📖[QBCore] ALL Config Files
      • 📋Installation
      • 📖Integrations
      • 📖Item Whitelist
      • ❗Common Issues
    • 💎Ice Box
      • 📖[ESX] ALL Configs Files
      • 📖[QBCore] ALL Config Files
      • 📋Installation
      • 📖Integrations
      • ❗Common Issues
    • 🔫Switch
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • 📖Integrations
      • ❗Common Issues
    • 🔫Gun Jamming
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • ❗Common Issues
    • 👀Lashes Saloon
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • ❗Common Issues
    • 💅Nails Saloon
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • ❗Common Issues
    • 🕐Duty System
      • 📖[ESX] Config Files
      • 📖[QB] Config Files
      • 📋Installation
      • 🧾Exports / Functions
      • ❗Common Issues
    • 🦱Wigs Bundle
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • 📋Create New Wigs
    • 🚗Chop Shop
      • 📖[ESX] Config Files
      • 📖[QBCore] Config Files
      • 📋Installation
      • 📋Exports (Optional)
      • ❗Copy of Common Issues
Powered by GitBook
On this page
  • Client Side:
  • Unlocked File Path:
  • Notification:
  • TextUi:
  • Police Dispatch:
  • Third Eye Target System
  • Server Side:
  • Unlocked File Path:
  • Active Jobs needed
  • XP System/ Give Something on specific item sell
  1. FS SCRIPTS
  2. Trap Phone

Integrations

Resource Integrations guide with other resources.

Client Side:

Unlocked File Path:

fs_trapphone/client/unlocked.lua

Notification:

Notification can be changed in this function

--bydefault we add ox_lib notification you can edit according to your need
function notification(title, text, duration, type, icon)    
        lib.notify({
            title = title,
            description = text,
            type = type,
            duration = duration,
            icon = icon,
            position = 'top'
        })
end

TextUi:

Textui can be changed in these functions

--by default we add ox lib textui

function TextUi(text)
    if text then
    --for show textui comment bottom line and add ur own
        lib.showTextUI(text)
    else
    --for remove tesxtui comment bottom line and add ur own
        lib.hideTextUI()
    end
end

Police Dispatch:

for police dispatch calls you can change modify this function

--by default we already setup qs-dispatch,cd_dispatch,op-dispatch
--if you want to use any of your own then modify this function

function dispach(coords)
     -- change only if you know what you are doing
    if GetResourceState('qs-dispatch') == 'started' then
        exports['qs-dispatch']:DrugSale()
    elseif GetResourceState('cd_dispatch') == 'started' then
        local data = exports['cd_dispatch']:GetPlayerInfo()
        TriggerServerEvent('cd_dispatch:AddNotification', {
            job_table = {'police', }, 
            coords = data.coords,
            title = '10-15 - Drug Selling',
            message = 'A '..data.sex..' selling drug at '..data.street, 
            flash = 0,
            unique_id = data.unique_id,
            sound = 1,
            blip = {
                sprite = 431, 
                scale = 1.2, 
                colour = 3,
                flashes = false, 
                text = '911 - Drug Sale',
                time = 5,
                radius = 0,
            }
        })
    elseif GetResourceState('op-dispatch') == 'started' then
        local job = "police" -- Jobs that will recive the alert
        local text = "A drug deal progress at"..GetStreetNameAtCoord(coords.x, coords.y, coords.z) -- Main text alert
        local coordinates = coords -- Alert coords
        local id = cache.serverId -- Player that triggered the alert
        local title = "Drug Deal" -- Main title alert
        local panic = false -- Allow/Disable panic effect
        TriggerServerEvent('Opto_dispatch:Server:SendAlert', job, title, text, coordinates, panic, id)
    else
        TriggerServerEvent('fs_trapphone:dispach', coords)
    end
end

Third Eye Target System

by default we added ox target as target system but if you want to add any other target system then you can modify this

function RegisterTarget(entity)
    local options = {
        label = 'Sell Drugs',
        name = 'selldrug',
        icon = 'fa-solid fa-capsules',
        canInteract = function (entity, distance)
            if distance <= 2.0 then
                return true
            end
        end,
        onSelect = function ()
            RemoveTarget(entity)
            SellDrugTarget()
        end
    }
    exports.ox_target:addLocalEntity(entity, options)
end

function RemoveTarget(entity)
    exports.ox_target:removeLocalEntity(entity, {'selldrug'})
end

Server Side:

Unlocked File Path:

fs_trapphone/server/unlocked.lua

Active Jobs needed

if you want to change logic of active jobs you can modify this functions according to ur need

lib.callback.register('fs_trapphone:joblogic', function(source)
    local _source = source
    local xPlayer = xPlayer(_source)
    local callback = false

    if Config.jobsNeeded.enable then 
      for name, count in pairs(Config.jobsNeeded.jobs) do
          local xPlayers = ESX.GetExtendedPlayers("job", name)

          if #xPlayers >= count then
              callback = true
              break
          else
              callback = false
          end
      end
      return callback
    else
      return true
    end
end)

XP System/ Give Something on specific item sell

modify this function if you want to apply ur xp system or want to give something or item on each item sell

--
--only trigger on successfully sell of drug for xp system etc
AddEventHandler('fs_trapphone:onDrugSell',function (serverId,itemname,quantity)
  
  -- code something if u want otherwise don't touch it if you dont know what its mean
end)
PreviousInstallationNextCommon Issues

Last updated 1 year ago

📱
📖