Skip to content

World elements ​

PickupSpec ​

Fields

  • model integer — An object model or a weapon model (321..373).
  • x number — Within 4095 of the origin, like y; z is -200..4000.
  • y number
  • z number
  • scale (optional) number — 0.1..10, default 1.
  • highlight (optional) boolean
  • behavior (optional) "collectible"|"static"
  • respawn_ms (optional) integer
  • virtual_world (optional) integer
  • interior (optional) integer

dlmp.create_pickup ​

Creates a world pickup owned by this resource (removed when the resource stops).

Parameters

Returns pickup Pickup|nil, err string|nil

dlmp.collect_pickup ​

Parameters

Returns ok boolean|nil, err string|nil

dlmp.destroy_pickup ​

Parameters

Returns ok boolean|nil, err string|nil

LabelSpec ​

Fields

  • text string — Up to 255 bytes; \n breaks lines.
  • x (optional) number — Required unless attached; the offset from the entity when attached (default 0).
  • y (optional) number
  • z (optional) number
  • color (optional) integer — 0xRRGGBB, default white.
  • draw_distance (optional) number — 0..300, default 20. An attached label is shown only while its entity is streamed to the viewer.
  • attach_player (optional) Player — Attaches the label to the player; it is shown to other players in that player's world. Cannot be combined with attach_vehicle.
  • attach_vehicle (optional) Vehicle — Attaches the label to the vehicle (streamed within 200); it is shown in the vehicle's world.
  • player (optional) Player — Shows it only to this player; defaults to everyone.
  • virtual_world (optional) integer
  • interior (optional) integer

dlmp.create_label ​

Creates a 3D text label owned by this resource.

Parameters

Returns label Label|nil, err string|nil

dlmp.destroy_label ​

Parameters

Returns ok boolean|nil, err string|nil

BlipSpec ​

Fields

  • x (optional) number — Required unless attached.
  • y (optional) number
  • z (optional) number
  • color (optional) integer — 0xRRGGBB, default white.
  • icon (optional) integer — Radar icon 1..63 for a blip at a coordinate; defaults to 0, a colored dot.
  • size (optional) number — 0.25..4, a multiplier of the usual dot or icon size; defaults to 1.
  • pulse (optional) boolean — Pulses on the pause map; defaults to false. Blips never pulse on the radar.
  • short_range (optional) boolean — Shown on the radar only while within its range, always shown on the pause map; defaults to false.
  • draw_distance (optional) number — Meters, 1..20000; hidden from players farther away. Defaults to any distance.
  • attach_player (optional) Player — Attaches the blip to the player at any distance; it is shown to other players in that player's world once both have spawned. Cannot be combined with attach_vehicle.
  • attach_vehicle (optional) Vehicle — Attaches the blip to the vehicle; it is shown in the vehicle's world.
  • player (optional) Player — Shows it only to this player; defaults to everyone.
  • virtual_world (optional) integer
  • interior (optional) integer

dlmp.create_blip ​

Creates a map blip owned by this resource.

Parameters

Returns blip Blip|nil, err string|nil

dlmp.destroy_blip ​

Parameters

Returns ok boolean|nil, err string|nil

GangZoneSpec ​

Fields

  • min_x number — World rectangle; min must be below max on both axes.
  • min_y number
  • max_x number
  • max_y number
  • color (optional) integer — 0xRRGGBB, default white.
  • alpha (optional) integer — 0..255, default 128.
  • visible (optional) boolean — Whether it is visible to everyone on creation; defaults to true.
  • virtual_world (optional) integer
  • interior (optional) integer

dlmp.create_gang_zone ​

Creates a gang zone owned by this resource. Later zones are drawn over earlier ones.

Parameters

Returns zone GangZone|nil, err string|nil

dlmp.destroy_gang_zone ​

Parameters

Returns ok boolean|nil, err string|nil

CheckpointSpec ​

Fields

  • player Player — The player the checkpoint is for; a player can have up to 16 at once.
  • x number
  • y number
  • z number
  • kind (optional) "normal"|"race"|"race_finish"|"air"|"air_finish" — Defaults to "normal". The air kinds are tested as a sphere, the others as a cylinder.
  • next_x (optional) number — The point a race checkpoint points to; defaults to its own position.
  • next_y (optional) number
  • next_z (optional) number
  • radius (optional) number — 0..100, default 3.
  • color (optional) integer — 0xRRGGBB, default red.
  • virtual_world (optional) integer
  • interior (optional) integer

dlmp.create_checkpoint ​

Creates a checkpoint owned by this resource. A player who is already inside gets checkpoint_enter. Death, a change of world and walking out raise checkpoint_leave; destroying the checkpoint and the player leaving the server raise nothing.

Parameters

Returns checkpoint Checkpoint|nil, err string|nil

dlmp.destroy_checkpoint ​

Parameters

Returns ok boolean|nil, err string|nil

ColshapeForm ​

Every size must be above 0 and at most 12000; the position, or both corners of a box, must lie within the world. Points on the surface count as inside.

Fields

  • kind "sphere"|"cylinder"|"box"
  • x (optional) number — Center of a sphere or of a cylinder's base; required for both.
  • y (optional) number
  • z (optional) number
  • radius (optional) number — Required for a sphere and a cylinder.
  • height (optional) number — Height of a cylinder above its base; required for a cylinder.
  • min_x (optional) number — Lower corner of a box; required for a box.
  • min_y (optional) number
  • min_z (optional) number
  • max_x (optional) number — Upper corner of a box, above the lower corner on every axis; required for a box.
  • max_y (optional) number
  • max_z (optional) number

ColshapeSpec ​

Has every field of ColshapeForm.

Fields

  • virtual_world (optional) integer
  • interior (optional) integer

dlmp.create_colshape ​

Creates a colshape owned by this resource. A colshape is an invisible trigger: the server tests every player and vehicle against it using the server-side position, without client involvement. colshape_enter is raised for anything already inside. A death, a wreck, a change of world and moving out raise colshape_leave; destroying the colshape, a player leaving the server and a vehicle being destroyed raise nothing, so a count kept from these events must also handle player_disconnect. Reads are accurate as of the last check. Events for a burst of crossings by one client (its player and the vehicles it controls) may arrive late, and a crossing reversed before its event is raised raises nothing.

Parameters

Returns colshape Colshape|nil, err string|nil

dlmp.destroy_colshape ​

Parameters

Returns ok boolean|nil, err string|nil

ObjectSpec ​

Fields

  • model integer — A game object model. LOD, vehicle and ped models are rejected.
  • x (optional) number — Required unless attached; when attached, the offset (default 0).
  • y (optional) number
  • z (optional) number
  • rx (optional) number — Degrees, default 0; relative to the parent when attached.
  • ry (optional) number
  • rz (optional) number
  • stream_distance (optional) number — Maximum distance from a player's view at which it is shown; default 300, up to 1500. Each player sees the nearest 1000.
  • attach_to (optional) Player|Vehicle|Object — The object inherits the parent's scope.
  • bone (optional) PedBone — Attaches to this bone of an attach_to player, as Object:attach_bone; rejected for any other parent.
  • player (optional) Player — Shows it only to this player.
  • virtual_world (optional) integer
  • interior (optional) integer

dlmp.create_object ​

Creates an object. A player teleported or spawned onto objects finds the nearest of them in place at the destination.

Parameters

Returns object Object|nil, err string|nil

dlmp.destroy_object ​

Removes the object and everything attached to it, without raising events.

Parameters

Returns ok boolean|nil, err string|nil

UiIcon ​

Type: "pin"|"target"|"flag"|"star"|"skull"|"person"|"car"|"house"|"money"|"heart"|"shield"|"food"|"water"|"energy"|"fuel"|"warning"|"lock"|"unlock"

MarkerSpec ​

An on-screen marker: an icon, a text and the distance, drawn over the world at any distance; when it is off screen, an arrow at the screen edge points toward it. It is placed at a coordinate or on attach_player or attach_vehicle; an attached marker follows the entity, takes its scope and is removed when the entity leaves or is removed. player shows it to that player only. A player does not see a marker attached to itself.

Fields

  • x number|nil — Required unless attached.
  • y number|nil
  • z number|nil
  • attach_player Player|nil
  • attach_vehicle Vehicle|nil
  • icon UiIcon|nil — Defaults to "pin"; any other name raises a Lua error.
  • text string|nil — Up to 63 bytes.
  • color integer|nil — 0xRRGGBB; defaults to the theme's accent color.
  • player Player|nil
  • virtual_world integer|nil
  • interior integer|nil

dlmp.create_marker ​

Parameters

Returns marker Marker|nil, err string|nil

dlmp.destroy_marker ​

Parameters

Returns ok boolean|nil, err string|nil

Marker ​

Marker:id ​

Returns integer

Marker:set_text ​

Parameters

  • text string

Returns ok boolean|nil, err string|nil

Marker:set_color ​

Parameters

  • color integer|nil — 0xRRGGBB; nil uses the theme's accent color.

Returns ok boolean|nil, err string|nil

Marker:set_position ​

Fails for an attached marker, which follows its entity.

Parameters

  • x number
  • y number
  • z number

Returns ok boolean|nil, err string|nil

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.