Skip to main content

Label::Label

Not available on SYNC MP yet

This member is part of the RAGE:MP API but SYNC MP does not implement it yet (Server-side JavaScript). Calling it does nothing or throws.

Creates a label in your world.

Syntax​

Shared

mp.labels.new(text, position,
{
los: los,
font: font,
drawDistance: drawDistance,
color: color,
dimension: dimension
});

Parameters​

  • *text: String
  • *position: Vector3
  • los: Boolean - Line of Sight (Text will hide if blocked by an entity).
  • font: Number (Font Types)
  • drawDistance: Number
  • color: [Number, Number, Number, Number]
  • dimension: dimension
  • = Required

Example​

Creates a label with the text "Welcome to Los Santos"

mp.labels.new("Welcome to Los Santos", new mp.Vector3(-431.88, 1146.86, 327),
{
los: true,
font: 1,
drawDistance: 100,
});

Labels also supports multiple lines of text, this can be achieved using "\n".