World elements
PickupSpec
Fields
modelinteger— An object model or a weapon model (321..373).xnumber— Within 4095 of the origin, likey;zis -200..4000.ynumberznumberscale(optional)number— 0.1..10, default 1.highlight(optional)booleanbehavior(optional)"collectible"|"static"respawn_ms(optional)integervirtual_world(optional)integerinterior(optional)integer
dlmp.create_pickup
Creates a world pickup owned by this resource (removed when the resource stops).
Parameters
specPickupSpec
Returns pickup Pickup|nil, err string|nil
dlmp.collect_pickup
Parameters
pickupPickup
Returns ok boolean|nil, err string|nil
dlmp.destroy_pickup
Parameters
pickupPickup
Returns ok boolean|nil, err string|nil
LabelSpec
Fields
textstring— Up to 255 bytes;\nbreaks lines.x(optional)number— Required unless attached; the offset from the entity when attached (default 0).y(optional)numberz(optional)numbercolor(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 withattach_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)integerinterior(optional)integer
dlmp.create_label
Creates a 3D text label owned by this resource.
Parameters
specLabelSpec
Returns label Label|nil, err string|nil
dlmp.destroy_label
Parameters
labelLabel
Returns ok boolean|nil, err string|nil
BlipSpec
Fields
x(optional)number— Required unless attached.y(optional)numberz(optional)numbercolor(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 withattach_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)integerinterior(optional)integer
dlmp.create_blip
Creates a map blip owned by this resource.
Parameters
specBlipSpec
Returns blip Blip|nil, err string|nil
dlmp.destroy_blip
Parameters
blipBlip
Returns ok boolean|nil, err string|nil
GangZoneSpec
Fields
min_xnumber— World rectangle; min must be below max on both axes.min_ynumbermax_xnumbermax_ynumbercolor(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)integerinterior(optional)integer
dlmp.create_gang_zone
Creates a gang zone owned by this resource. Later zones are drawn over earlier ones.
Parameters
specGangZoneSpec
Returns zone GangZone|nil, err string|nil
dlmp.destroy_gang_zone
Parameters
zoneGangZone
Returns ok boolean|nil, err string|nil
CheckpointSpec
Fields
playerPlayer— The player the checkpoint is for; a player can have up to 16 at once.xnumberynumberznumberkind(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)numbernext_z(optional)numberradius(optional)number— 0..100, default 3.color(optional)integer— 0xRRGGBB, default red.virtual_world(optional)integerinterior(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
specCheckpointSpec
Returns checkpoint Checkpoint|nil, err string|nil
dlmp.destroy_checkpoint
Parameters
checkpointCheckpoint
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)numberz(optional)numberradius(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)numbermin_z(optional)numbermax_x(optional)number— Upper corner of a box, above the lower corner on every axis; required for a box.max_y(optional)numbermax_z(optional)number
ColshapeSpec
Has every field of ColshapeForm.
Fields
virtual_world(optional)integerinterior(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
specColshapeSpec
Returns colshape Colshape|nil, err string|nil
dlmp.destroy_colshape
Parameters
colshapeColshape
Returns ok boolean|nil, err string|nil
ObjectSpec
Fields
modelinteger— 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)numberz(optional)numberrx(optional)number— Degrees, default 0; relative to the parent when attached.ry(optional)numberrz(optional)numberstream_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 anattach_toplayer, asObject:attach_bone; rejected for any other parent.player(optional)Player— Shows it only to this player.virtual_world(optional)integerinterior(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
specObjectSpec
Returns object Object|nil, err string|nil
dlmp.destroy_object
Removes the object and everything attached to it, without raising events.
Parameters
objectObject
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
xnumber|nil— Required unless attached.ynumber|nilznumber|nilattach_playerPlayer|nilattach_vehicleVehicle|niliconUiIcon|nil— Defaults to "pin"; any other name raises a Lua error.textstring|nil— Up to 63 bytes.colorinteger|nil— 0xRRGGBB; defaults to the theme's accent color.playerPlayer|nilvirtual_worldinteger|nilinteriorinteger|nil
dlmp.create_marker
Parameters
specMarkerSpec
Returns marker Marker|nil, err string|nil
dlmp.destroy_marker
Parameters
markerMarker
Returns ok boolean|nil, err string|nil
Marker
Marker:id
Returns integer
Marker:set_text
Parameters
textstring
Returns ok boolean|nil, err string|nil
Marker:set_color
Parameters
colorinteger|nil— 0xRRGGBB;niluses 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
xnumberynumberznumber
Returns ok boolean|nil, err string|nil
