Blip
Easy to create blips for your REDM resource.
Example
Methods
exports.nss_libs:getBlipsApi(resource_name)
exports.nss_libs:getBlipsApi(resource_name)
Returns the NPC api NssLibsBlipsApi
for the given resource.
resource_name
(string) - The name of the resource that wants to use the API.
NssLibsBlipsApi
NssLibsBlipsApi
create(icon, title, color)
create(icon, title, color)
icon
(number|string) - The icon of the blip entity. See multiplayer blip textures or single player blip textures for a list of available icons.title
(optional, string) - The title of the blip entity.color
(number|string) - The color of the blip entity. See blip colors and modifiers for a list of available colors.
Returns a blip entity api NssLibsBlipApi
.
createAtCoords(x, y, z, icon, color, title)
createAtCoords(x, y, z, icon, color, title)
x
(number) - The x position of the blip.y
(number) - The y position of the blip.z
(number) - The z position of the blip.See
create
for the other parameters.
Returns a blip entity api NssLibsBlipApi
.
createAttachedToEntity(entity, icon, color, title)
createAttachedToEntity(entity, icon, color, title)
entity
(number) - The entity handle of the blip.See
create
for the other parameters.
Returns a blip entity api NssLibsBlipApi
.
createRadiusAtCoords(x, y, z, range, color)
createRadiusAtCoords(x, y, z, range, color)
x
(number) - The x position of the blip.y
(number) - The y position of the blip.z
(number) - The z position of the blip.range
(number) - The range in meters (radius) of the blip.See
create
for the other parameters.
Note: Radius blips has no icon or title.
Returns a blip entity api NssLibsBlipApi
.
NssLibsBlipApi
NssLibsBlipApi
destroy()
destroy()
Removes the blip completely.
show()
show()
Shows the blip.
Returns NssLibsBlipApi
.
hide()
hide()
Hides the blip.
Returns NssLibsBlipApi
.
setCoords(x, y, z)
setCoords(x, y, z)
Sets the coordinates of the blip.
Resets the entity of the blip if set before.
x
(number) - The x position of the blip.y
(number) - The y position of the blip.z
(number) - The z position of the blip.
Returns NssLibsBlipApi
.
setEntity(entity)
setEntity(entity)
Attach the blip to an entity.
Resets the coordinates of the blip if set before.
entity
(number) - The entity handle of the blip.
Returns NssLibsBlipApi
.
setRadius(x, y, z, range)
setRadius(x, y, z, range)
Sets the coordinates and the range (size) of the blip.
Resets the entity of the blip if set before.
x
(number) - The x position of the blip.y
(number) - The y position of the blip.z
(number) - The z position of the blip.range
(number) - The range in meters (radius) of the blip.
Returns NssLibsBlipApi
.
setColor(color)
setColor(color)
Sets the color of the blip.
color
(number|string) - The color of the blip entity. See blip colors and modifiers for a list of available colors.
Returns NssLibsBlipApi
.
setTitle(title)
setTitle(title)
Sets the title of the blip.
title
(string) - The title of the blip entity. If empty no title will be shown.
Returns NssLibsBlipApi
.
setIcon(icon)
setIcon(icon)
Sets the icon of the blip.
icon
(number|string) - The icon of the blip entity. See multiplayer blip textures or single player blip textures for a list of available icons.
Returns NssLibsBlipApi
.
setSmall()
setSmall()
Sets the size of the blip to small.
Returns NssLibsBlipApi
.
setMedium()
setMedium()
Sets the size of the blip to medium.
Returns NssLibsBlipApi
.
setBig()
setBig()
Sets the size of the blip to large.
Returns NssLibsBlipApi
.
isVisible()
isVisible()
Returns true
if the blip is visible, otherwise false
.
addModifier(modifier)
addModifier(modifier)
Adds a modifier to the blip.
modifier
(number|string) - The modifier of the blip entity. See blip colors and modifiers for a list of available modifiers.
Returns NssLibsBlipApi
.
Todos
Last updated