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.table.deepClone
  • lib.table.findKeyInTable
  • lib.table.includes
  • lib.table.convert
  • lib.table.count
Export as PDF
  1. Resources
  2. Dirk Lib
  3. Modules

Table

Used to request models and textures

Client Module - This can only be used on the client

lib.table.deepClone

Used to quickly copy a table, useful for global state values

local copiedTable = lib.table.deepClone(table)
Parameter
Type
Required
Description

table

ObjectArray

Table to be copied

lib.table.findKeyInTable

Check through a table for a set key

local foundData = lib.table.findKeyInTable(tbls, key)
Parameter
Type
Required
Description

tbls

StringObject

Table to be searched

key

StringNumber

Key to be found

lib.table.includes

Check if a value is present in a table

local found = lib.table.includes(table, value, recursive)
Parameter
Type
Required
Description

table

ObjectArray

Table to be searched

value

Object

Value to be found

recursive

Boolean

Check sub tables too

lib.table.convert

Convert data to different formats

local data = lib.table.convert(_type, data)
Parameter
Type
Required
Description

_type

String

Type of data - vectors, items_sql, string, item_ox, convert_idexes

data

Any

Data to be converted

lib.table.count

Count a table and sub tables

local count = lib.table.count(table)
Parameter
Type
Required
Description

table

ObjectArray

Table to be counted

PreviousRequestNextTarget

Last updated 10 months ago

📚