Label::Label
Jump to navigation
Jump to search
Creates a label in your world.
Contents
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".