DirkScripts Documentation
CtrlK
  • ๐Ÿ‘‹Welcome
  • The Basics
    • โฌ‡๏ธInstalling Resources
  • Resources
    • ๐Ÿ“šDirk Lib
      • Getting Started
      • Cache
      • Modules
        • await
        • blip
        • callback
        • interact
        • Objects
        • Player
          • Client
          • Server
        • Groups
          • Client
          • Server
        • Print
        • Request
        • Table
        • Target
        • Zones
        • UI
          • Context
          • Untitled
    • ๐Ÿ”งProject Cars
      • Getting Started
      • Types
        • Tool Item
        • Part Item
      • Commands
    • ๐ŸคผMulticharacter
      • Getting Started
      • Configuration
      • Exports
      • Commands
      • Changelog
    • ๐ŸชStores
      • Getting Started
      • Types
        • Store
        • Category
        • Stock
      • Exports
      • Changelog
    • ๐Ÿ’ŠDrug Labs v2
      • Installation
      • Tebex Integration
      • Creating Labs
  • ๐Ÿ›’Store
  • ๐Ÿ—ฃ๏ธDiscord
  • ๐Ÿ–ฅ๏ธGitHub
Powered by GitBook
On this page
Export as PDF
  1. Resources
  2. ๐Ÿ“šDirk Lib
  3. Modules

await

A small module containing a simple time based await for function callback

Shared Module - This can be used by both clients and the server

lib.await

Used to add a timed delay to the defined callback

lib.await(func, timeout)
Parameter
Type
Required
Description

func

Function

Callback function to be executed

timeout

Number

Duration in sections to wait

PreviousModulesNextblip

Last updated 1 year ago