Events / Exports

All events and exports are for client

/hud Menu

Opens the buff that opens with the /hud command

TriggerEvent("tgiann-lumihud:hudMenu")

UI Open/Close

Opens the buff that opens with the /hud command

TriggerEvent("tgiann-lumihud:ui", open)

Parameters :

NameTypeDescription

open

boolen

turns hud on if true and off if false


AddStatusHud

Adds extra hud like food, thirst, health

If you trigger this event while hud is added, it will update hud

exports["tgiann-lumihud"]:AddStatusHud(hudName, isBig, iconName, color, value, data)

Parameters :

NameTypeDescription

hudName

string

Uniq name

isBig

boolen

if true, the indicator will be large like the health or armor indicator

iconName

string

Icon name: tgiann-lumihud/ui/assets

color

string

Hex or RGB color code

value

number or int

The value in the hud indicator. In percentage

data

table

Location and button settings

Example

exports["tgiann-lumihud"]:AddStatusHud("testHud", true, "phone", "red", 15, {
    normal = {
        style = { left = "58vh", bottom = "2vh" },
        buttons = {
            move = true,
            color = true,
            scale = true,
            customButtons = true,
        },
    },
    car = {
        style = { left = "75vh", bottom = "2.9vh" },
        buttons = {
            move = true,
            color = true,
            scale = true,
            customButtons = true,
        },
    }
})

UpdateStatusValue

Updates the percentage of a previously added hud

exports["tgiann-lumihud"]:UpdateStatusValue(hudName, value)

Parameters :

NameTypeDescription

hudName

string

Uniq name

value

number or int

The value in the hud indicator. In percentage of the hud indicator

Example

exports["tgiann-lumihud"]:UpdateStatusValue("testHud", 25)

RemoveStatusHud

Removes the previously added hud

exports["tgiann-lumihud"]:RemoveStatusHud(hudName)

Parameters :

NameTypeDescription

hudName

string

Uniq name

Example

exports["tgiann-lumihud"]:RemoveStatusHud("testHud")

GetTotalKm

Returns the total tm value of the vehicle

exports["tgiann-lumihud"]:GetTotalKm(plate)

Parameters :

NameTypeDescription

plate

string

Vehicle plate name

Example

local totalKm = exports["tgiann-lumihud"]:GetTotalKm("AB325CD")

Seatbelt

Returns whether the player's seat belt is fastened or not

exports["tgiann-lumihud"]:Seatbelt()

Example

local seatbelt = exports["tgiann-lumihud"]:Seatbelt()

Last updated