Vivum Target

Icons

Learn how to add icons to your targets

Enter Vehicle

Open Door

Overview

Vivum Target supports FontAwesome 7 icons and custom runtime textures. Icons can replace the inner star of the target or appear to the left of menu items.

Preloading Icons

As the icons are loaded at runtime, they may be unavailable for the first few renders of the target. To prevent this, you can preload the icons using the PreloadIcons export.

fontawesome.lua

exports["vivum-target"]:AddTarget({
	name = "fontawesome-icon",
	target = {
		position = vector3(0, 0, 0),
	},
	icon = "fas fa-car",
	items = {
		{
			icon = "fas fa-car",
			label = "Enter Vehicle",
		},
		{
			icon = "fas fa-door-open",
			label = "Open Door",
		},
	}
})

@class MenuIconTexture

Can be used to specify a ingame texture for the menu icon (e.g. a ped headshot).

FieldTypeDescription
txn

string

txd?

string

If not specified, the txd will be set to the same value as txn.

width?

number

Defaults to 1.

height?

number

Defaults to 1.

custom.lua

local txd = "..."
local txn = "..."

exports["vivum-target"]:AddTarget({
	name = "custom-icon",
	target = {
		position = vector3(0, 0, 0),
	},
	icon = {
		txd = txd,
		txn = txn,
	},
})