JixelPatterns
  • JixelPatterns Documentation
  • Troubleshooting
    • Common Issues
    • Setting Up Locations
    • FAQ
  • Dependency
    • Jim_Bridge
      • Animal Ped Support
      • Script Helpers
      • Loader Functions
      • Callbacks
      • Cameras
      • Context Menus
      • Crafting
      • DrawText
      • Dui Functions
      • Input Creator
      • Inventories
      • Job Functions
      • Make Functions
      • Meta Handlers
      • Notifications
      • Phones
      • Player Functions
      • Poly Zones
      • Progress Bars
      • Scale Entity
      • Shops
      • Skillcheck
      • Society Banking
      • Stash Control
      • Targets
      • Vehicles
      • Wrapper Functions
      • Scaleforms
  • Paid Assets
    • Jim-Mechanic
      • Common Issues
      • Installation
      • Locations
        • Creating a Location
      • Nitrous
      • Harness + Seatbelt
      • Emergency Repair Bench
      • Odometer
      • Speedometer
      • Performance Mods
      • Preview System
      • Repair System
      • Car Lifts
      • Plate Change
      • Push Vehicle
      • Stancer Kit
      • Vehicle Seat Picker
    • Jim-Bakery
      • Installation
    • Jim-BeanMachine
      • Installation
    • Jim-BurgerShot
      • Installation
    • Jim-CatCafe
      • Installation
    • Jim-Henhouse
      • Installation
    • Jim-PizzaThis
      • Installation
    • Jim-Popsdiner
      • Installation
  • Free Assets
    • Jim-Mining
      • Installation
      • How To Use
        • Mining
        • Stone Washing
        • Gold Panning
    • Jim-Recycle
      • Installation
      • How To Use
        • Recycling
        • Dumpster Diving
        • Scrapping
    • Jim-Payments
      • Installation
      • How To Use
    • Jim-Shops
      • Installation
      • How To Use
    • Jim-Boarding
      • Installation
      • How To Use
    • Jim-Trains
      • Installation
      • How To Use
    • Jim-Consumbles
      • Installation
      • How To Use
    • Jim-DJBooth
      • Installation
      • How To Use
    • Jim-JobGarage
      • Installation
      • How To Use
    • Jim-Chairs
      • Installation
    • Jim-Notepad
      • Installation
      • How To Use
Powered by GitBook
On this page
  • targets.lua
  • createEntityTarget(entity, opts, dist)
  • createBoxTarget(data, opts, dist)
  • createCircleTarget(data, opts, dist)
  • createModelTarget(models, opts, dist)
  • removeEntityTarget(entity)
  • removeZoneTarget(target)
  • removeModelTarget(model)
  1. Dependency
  2. Jim_Bridge

Targets

targets.lua

This module provides utility functions for adding and removing interaction targets with entities, models, zones, and coordinates.

Supports common targeting frameworks like ox_target, qb-target

createEntityTarget(entity, opts, dist)

Adds interaction targets to a specific in-world entity.

Example:

createEntityTarget(entityId, {
   {
       action = function()
           openStorage()
       end,
       icon = "fas fa-box",
       job = "police",
       label = "Open Storage",
   },
}, 2.0)

createBoxTarget(data, opts, dist)

Creates an interactable box zone with configurable options.

Example:

createBoxTarget(
   {
       'storageBox',
       vector3(100.0, 200.0, 30.0),
       2.0,
       2.0,
       {
           name = 'storageBox',
           heading = 100.0,
           debugPoly = true,
           minZ = 27.0,
           maxZ = 32.0,
       },
   },
{
   {
       action = function()
           openStorage()
       end,
       icon = "fas fa-box",
       job = "police",
       label = "Open Storage",
   },
}, 2.0)

createCircleTarget(data, opts, dist)

Creates an interactable circular zone.

Example:

createCircleTarget({
    name = 'centralPark',
    coords = vector3(200.0, 300.0, 40.0),
    radius = 50.0,
    options = { debugPoly = false }
}, {
    { icon = "fas fa-tree", label = "Relax", action = relaxAction }
}, 2.0)

createModelTarget(models, opts, dist)

Adds interactions to all matching models globally.

Example:

createModelTarget({ model1, model2 },
{
   {
       action = function()
           openStorage()
       end,
       icon = "fas fa-box",
       job = "police",
       label = "Open Storage",
   },
}, 2.0)

removeEntityTarget(entity)

Removes all targets linked to the specified entity.

Example:

removeEntityTarget(vehicle)

removeZoneTarget(target)

Removes a named zone-based target.

Example:

removeZoneTarget("shop_box")

removeModelTarget(model)

Removes interactions tied to a model globally.

Example:

removeModelTarget("prop_vend_soda")

PreviousStash ControlNextVehicles

Last updated 2 days ago