DirkScripts Documentation
  • 👋Welcome
  • The Basics
    • ⬇️Installing Resources
  • Resources
    • 📚Dirk Lib
      • Getting Started
      • Cache
      • Modules
        • Await
        • Blip
        • Callback
        • Camera
        • File
        • Interact
        • Objects
        • Player
          • Client
          • Server
        • Groups
          • Client
          • Server
        • Print
        • Request
        • Table
        • Target
        • Zones
        • UI
          • Context
          • Untitled
    • 🔧Project Cars
      • Installation
      • Tools
      • Parts
      • Commands
    • 🤼Multicharacter
      • Installation
      • Configuration
      • Exports
      • F.A.Q
      • Commands
    • 💊Drug Labs v2
      • Installation
      • Tebex Integration
      • Creating Labs
  • 🛒Store
  • 🗣️Discord
  • 🖥️GitHub
Powered by GitBook
On this page
  • lib.objects.register
  • lib.objects.get
  • lib.objects.destroy
  • Data Structure
Export as PDF
  1. Resources
  2. Dirk Lib
  3. Modules

Objects

Used to register and remove object spawning, from peds to vehicles.

Client Module - This can only be used on the client

lib.objects.register

Create a new object

lib.objects.register(name, new_data)
Parameter
Type
Required
Description

name

String

Unique reference for object

new_data

Object

lib.objects.get

Get information regarding an object

local obj = lib.objects.get(name)
Parameter
Type
Required
Description

id

String

Unique reference for the object

lib.objects.destroy

Completely remove an object

lib.object.destroy(id)
Parameter
Type
Required
Description

id

String

Unique reference for the object

Data Structure

This is the data structure of an object and the valid options

{
    type = "ped",                 -- This can be: ped, vehicle or object
    model = `a_f_m_bevhills_01`,  -- Model to be spawned, must be the model hash
    pos = vector4(0, 0, 0, 0),    -- Position of the object
                                  -- This also can be a polyzone for a set render area
    renderDist = 50,              -- When to render the object
}
PreviousInteractNextPlayer

Last updated 10 months ago

Options for the object, refer to

📚
Data Structure