You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: This function creates a [[blip]] that is attached to an [[element]]. This blip is displayed as an icon on the client's radar and will 'follow' the element that it is attached to around.
4
+
oop:
5
+
element: blip
6
+
method: createAttachedTo
7
+
static: true
8
+
parameters:
9
+
- name: elementToAttachTo
10
+
type: element
11
+
description: The [[element]] to attach the blip to.
12
+
- name: icon
13
+
type: int
14
+
description: The icon that the radar blips should be. Default is 0. Valid values can be seen at [Radar Blips](/reference/ID_Lists/Blips).
15
+
default: '0'
16
+
- name: size
17
+
type: int
18
+
description: The size of the radar blip. Only applicable to the Marker icon. Default is 2. Maximum is 25.
19
+
default: '2'
20
+
- name: r
21
+
type: int
22
+
description: The amount of red in the blip's color (0-255). Only applicable to the Marker icon. Default is 255.
23
+
default: '255'
24
+
- name: g
25
+
type: int
26
+
description: The amount of green in the blip's color (0-255). Only applicable to the Marker icon. Default is 0.
27
+
default: '0'
28
+
- name: b
29
+
type: int
30
+
description: The amount of blue in the blip's color (0-255). Only applicable to the Marker icon. Default is 0.
31
+
default: '0'
32
+
- name: a
33
+
type: int
34
+
description: The amount of alpha in the blip's color (0-255). Only applicable to the Marker icon. Default is 255.
35
+
default: '255'
36
+
- name: ordering
37
+
type: int
38
+
description: This defines the blip's Z-level ordering (-32768-32767). Default is 0.
39
+
default: '0'
40
+
- name: visibleDistance
41
+
type: float
42
+
description: The maximum distance from the camera at which the blip is still visible (0-65535).
43
+
default: '16383.0'
44
+
- name: visibleTo
45
+
type: element
46
+
description: This defines which elements can see the blip. Defaults to visible to everyone. See [[visibility]].
47
+
default: 'getRootElement()'
48
+
returns:
49
+
values:
50
+
- type: blip|false
51
+
name: created-blip
52
+
description: Returns an element of the [[blip]] if it was created successfully, false otherwise.
7
53
server:
8
54
<<: *shared
55
+
examples:
56
+
- path: examples/createBlipAttachedTo-1.lua
57
+
description: This example creates a radar [[blip]] attached to a random [[player]], visible to everyone. The blip will follow the player around as they move. This could be used for manhunt, to emphasise a random player.
58
+
- path: examples/createBlipAttachedTo_OOP-1.lua
59
+
description: This example creates a radar [[blip]] attached to a random [[player]], visible to everyone. The blip will follow the player around as they move. This could be used for manhunt, to emphasise a random player.
0 commit comments