Skip to content

Map ​

A loaded map: the elements it placed, looked up by their document ids, and its points as data.

Map:points ​

The map's points of one kind, or all of them, as { id, kind, x, y, z, heading, interior, attrs }.

Parameters

  • kind (optional) string

Returns points table[]

Map:object ​

The object with document id id; nil if unknown or already unloaded.

Parameters

  • id string

Returns object Object|nil

Map:vehicle ​

The vehicle with document id id; nil if unknown or already unloaded.

Parameters

  • id string

Returns vehicle Vehicle|nil

Map:vehicles ​

The map's vehicles as { id, vehicle, respawn_delay, attrs }. The core does not respawn them: acting on respawn_delay (seconds, 0 = none) and attrs is up to the gamemode.

Returns vehicles table[]

Map:pickup ​

The pickup with document id id; nil if unknown or already unloaded.

Parameters

  • id string

Returns pickup Pickup|nil

Map:pickups ​

The map's pickups as { id, pickup, attrs }; the gamemode implements each pickup's effect through pickup_interact.

Returns pickups table[]

Map:label ​

The label with document id id; nil if unknown or already unloaded.

Parameters

  • id string

Returns label Label|nil

Map:labels ​

The map's labels as { id, label, attrs }.

Returns labels table[]

Map:blip ​

The blip with document id id; nil if unknown or already unloaded.

Parameters

  • id string

Returns blip Blip|nil

Map:blips ​

The map's blips as { id, blip, attrs }.

Returns blips table[]

Map:marker ​

The marker with document id id; nil if unknown or already unloaded.

Parameters

  • id string

Returns marker Marker|nil

Map:markers ​

The map's markers as { id, marker, attrs }.

Returns markers table[]

Map:gang_zone ​

The gang zone with document id id; nil if unknown or already unloaded.

Parameters

  • id string

Returns zone GangZone|nil

Map:gang_zones ​

The map's gang zones as { id, gang_zone, attrs }.

Returns gang_zones table[]

Map:colshape ​

The colshape with document id id; nil if unknown or already unloaded.

Parameters

  • id string

Returns colshape Colshape|nil

Map:colshapes ​

The map's colshapes as { id, colshape, attrs }.

Returns colshapes table[]

Map:checkpoints ​

The map's checkpoint templates as { id, kind, x, y, z, radius, color, next, interior, attrs }: next is the id of the template a race checkpoint points to, or nil. The map places none of them; give_checkpoint gives one to a player.

Returns checkpoints table[]

Map:checkpoint ​

The checkpoint template with document id id, in the same shape as checkpoints returns; nil if unknown.

Parameters

  • id string

Returns checkpoint table|nil

Map:give_checkpoint ​

Creates a checkpoint for the player from template id, in the map's world, pointing at its next. The checkpoint belongs to this resource; unload also removes it.

Parameters

Returns checkpoint Checkpoint|nil, err string|nil

Map:unload ​

Removes everything the map placed. Stopping the resource does the same.

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.