DirkScripts Logo

Login With FiveM

Login

πŸ–₯️ Dirk Core
β€Ί
Functions
β€Ί
Client
β€Ί

πŸ‘οΈ Target

πŸ‘οΈ Target

AddBoxZone

{% code fullWidth="false" %}

lua
Core.Target.AddBoxZone("myBoxZone", {
    Position = vector4(0,0,0,0),
    Distance = 1.5, 
    Height   = 2.0, 
    Width    = 2.0, 
    Length   = 1.0, 
    Options  = {
        {
            canInteract = function(entity,distance,data)
                --## return false if you dont want to be able to see this option
              return true
            end,
    
            action = function(entity)
              --## Run my code here on interact with this option
            end,
    
            icon  = 'fa-solid fa-burger',
            label = "My Option Label",
        },
    },
})

{% endcode %}

DeleteZone

lua
Core.Target.DeleteZone("zoneName") --## Will remove this target zone

AddEntity

lua
--## Entity can be a network entity id or just a regular id
Core.Target.AddEntity(entity, { 
    Distance = 1.0, 
    Local    = false, --## Set to true if this is a network entity/ID
    Options  = {
        {
            canInteract = function(entity,distance,data)
                --## return false if you dont want to be able to see this option
              return true
            end,
    
            action = function(entity)
              --## Run my code here on interact with this option
            end,
    
            icon  = 'fa-solid fa-burger',
            label = "My Option Label",
        },
    },
})

RemoveEntity

lua
Core.Target.RemoveEntity(entity,isNetworkEntity)
--## Will remove target options from this entity

AddGlobalVehicle

  Core.Target.AddGlobalVehicle({
    Distance = 1.5, 
    Options  = { 
      {
        canInteract = function(entity, distance, data,name, bone)
          return true
        end,

        action = function(...)
          local argR = {...}
          local arg = argR[1]
          --## arg.entity etc is accessible like this

        end,
        icon  = "fas fa-box-open",
        label = "Place Object",
      }
    },
  })

AddGlobalPed

lua
  Core.Target.AddGlobalPed({
    Distance = 1.5, 
    Options  = { 
      {
        canInteract = function(entity, distance, data,name, bone)
          return true
        end,

        action = function(...)
          local argR = {...}
          local arg = argR[1]
          --## arg.entity etc is accessible like this

        end,
        icon  = "fas fa-box-open",
        label = "Place Object",
      }
    },
  })

Copyright Β© 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.

Daily dig available!

Hey you, you have free digs waiting

Dig Now