BIT - DOCUMENTATION
  • BIT DOCUMENTATION
  • â„šī¸INFORMATION
    • Licensing System
    • Terms of Service
    • Common issues
    • Support
  • ❓HOW TO...
    • Change inventory
      • Add Item
      • Remove Item
    • How to update an asset
    • How to add items
    • Items images
    • Change notifications
  • đŸ–Ĩī¸PAID SCRIPTS
    • đŸ’ŗ BIT-Licenses
      • Installation
      • Commands
      • Triggers & Exports
      • Items
    • đŸĻ  BIT-Diseases
      • Installation
      • Triggers, Export and Commands
    • 🔓 BIT-Unlock
      • Installation
      • Trigger
      • How it works?
    • 🔊 BIT-Radio
      • Installation
      • Configuration
      • Trigger
      • Items
    • 💊 BIT-DrugsCreator
      • Installation
      • Configuration
      • Trigger
      • Target
    • âš ī¸ BIT-Notifications
      • Installation
      • Configuration
      • Trigger
    • đŸ–ī¸BIT-InteractiveCity
      • Installation
      • Dependencies
      • Configuration
      • Actions
      • Target
    • 🚘 BIT-UsedCars
      • Installation
      • Dependencies
      • Configuration
      • Target
    • đŸ—‘ī¸ BIT-GarbageJob
      • Installation
      • Dependencies
      • Configuration
      • Target
      • Items
    • đŸ› ī¸ BIT-AdvancedTasks
      • Installation
      • Dependencies
      • Custom Voices
      • Custom NPC
      • Rewards
      • Target
    • 🏆 BIT-Rewards
      • Installation
      • SQL
      • Configuration
      • Trigger
    • 📊 BIT-Scoreboard
      • Installation
      • Configuration
    • đŸ›ī¸ BIT-Stores
      • Installation
      • Example Items
      • Configuration
      • Create a polyzone
      • Add Items
    • đŸ”Ē BIT-Gangs
      • Installation
      • SQL and Items
      • Configuration
      • Triggers and Exports
    • đŸ’ŧ BIT-Jobs
      • Installation
      • SQL and Items
      • Create Jobs
      • ProgressBar
      • Configuration
      • Add Jobs
      • Random position
      • Triggers
      • Possible mistakes
    • 🏨 BIT-Motels
      • Installation
      • MLO
      • SQL
      • Configuration
      • Triggers
    • 👗 BIT-ClothingShop v.2
      • Installation
      • Create Images
      • Image Resolution
      • Debug & Test
      • SQL
      • Configuration
      • Possible mistakes
    • ✨ BIT-Creator
      • Installation
      • SQL
      • Configuration
      • Triggers
    • đŸĸ BIT-Business 2.0
      • Installation
      • SQL
      • Configuration
      • Colors
      • Income
      • Payment Methods
    • 🚗 BIT-Garage
      • Installation
      • Dependencies
      • Configuration
      • Functions
      • Jobs/Gangs
      • Triggers
      • Commands
      • Possible mistakes
    • 🚘 BIT-VehControl
      • Installation
      • Dependencies
      • Configuration
      • Triggers
      • Possible mistakes
    • 🐾 BIT-Pets
      • Installation
      • SQL
      • Dependencies
      • Configuration
      • Target
      • Triggers
      • Questions
      • Possible mistakes
    • đŸ‘Žâ€â™‚ī¸ BIT-PoliceMDT
      • Installation
      • SQL
      • Configuration
      • Dependencies
      • Triggers
      • Possible mistakes
    • â›Ŋ BIT-Fuel
      • Installation
      • Configuration
      • Exports
      • Questions
    • 💰 BIT-Crypto
      • Installation
      • SQL
      • Configuration
      • Triggers & Exports
      • Questions
    • 🚙 BIT-Carrental
      • Installation
      • Configuration
    • đŸ“ģ BIT-Carradio
      • Installation
      • Dependencies
      • Configuration
    • 📝 BIT-Reportsystem
      • Installation
      • SQL
      • Configuration
      • Questions
    • đŸšĻBIT-Drivingschool
      • Installation
      • SQL
      • MLO
      • Configuration
      • Triggers
      • Add routes
      • License Item
      • Transcription
    • ⚓ BIT-BoatSchool
      • Installation
      • SQL
      • Configuration
      • Triggers
      • Add routes
      • License Item
      • Transcription
    • đŸ›Šī¸ BIT-Flightschool
      • Installation
      • SQL
      • Configuration
      • Triggers
      • Add routes
      • License Item
      • Transcription
    • 🚜 BIT-Dealership
      • Installation
      • Configuration
      • Possible mistakes
    • đŸĒ™ BIT-Coin System
      • Installation
      • Configuration
      • Trigger
    • đŸĻ BIT-Bank
      • Installation
      • SQL
      • Configuration
    • đŸ–Ĩī¸ BIT-HUD
      • Installation
      • Configuration
      • Triggers
    • 🎮 BIT-Battlepass 3
      • Installation
      • SQL
      • Configuration
      • Commands
      • Triggers
      • Questions
      • Possible mistakes
    • 📋 BIT-Pausemenu
      • Installation
      • SQL
      • Configuration
    • đŸ“Ļ BIT-TreasureHunting
      • Installation
      • Dependencies
      • Configuration
      • Target
Powered by GitBook
On this page
  • QB-Target
  • OX-Target
  1. PAID SCRIPTS
  2. 💊 BIT-DrugsCreator

Target

QB-Target

Config.useTarget = true

function entityTarget(entity, event, label, drug, processType)
    local selector = nil
    if processType == "craft" then
        selector = "craft"
    else
        selector = "process"
    end
    exports["qb-target"]:AddTargetEntity(
        entity,
        {
            options = {
                {
                    type = "client",
                    event = event,
                    icon = "fas fa-box-circle-check",
                    label = label,
                    args = {
                        drug = drug,
                        process = selector
                    }
                }
            },
            distance = 3.0
        }
    )
end

OX-Target

Config.useTarget = true

function entityTarget(entity, event, label, drug, processType)
    local selector = processType == "craft" and "craft" or "process"

    local options = {
        {
            name = event,
            icon = "fas fa-box-circle-check",
            label = label,
            onSelect = function(data)
                TriggerEvent(event, data)
            end,
            args = {
                drug = drug,
                process = selector
            }
        }
    }

    if NetworkGetEntityIsNetworked(entity) then
        local netId = NetworkGetNetworkIdFromEntity(entity)
        exports["ox_target"]:addEntity(netId, options)
    else
        exports["ox_target"]:addLocalEntity(entity, options)
    end
end
PreviousTriggerNextâš ī¸ BIT-Notifications

Last updated 5 months ago

đŸ–Ĩī¸