Skip to content

Lua API reference ​

Resources interact with the game only through the dlmp table and the handles its functions return. This reference is generated from resources/.types/dlmp.lua, the same type stub that provides completion and type checking in editors, so the two always match.

  • The dlmp table pages group the functions by topic, from Resources to Vehicles, together with the option tables they accept.
  • Handles are the objects that functions return, such as a Player, a Vehicle or a Timer. A handle's methods act on its element at the time of the call. Some actions also exist as a dlmp function that takes the handle as its first argument.

Reading an entry ​

  • A parameter marked optional can be omitted or nil.
  • Most actions return boolean|nil ok, string|nil err: true on success, or nil and the reason the server refused. A bug in the script, such as an argument of the wrong type, raises an error instead. See Errors and the sandbox.
  • Events and their arguments are listed under dlmp.add_event_handler and explained in Events, commands and timers.

Documentation licensed under CC BY 4.0. DarqlineMP is not affiliated with Rockstar Games or Take-Two Interactive. Grand Theft Auto is a trademark of Take-Two Interactive Software, Inc.