Client
Last updated
Last updated
data
is SQL query result from Bridge.GetOwnedVehicles function.
---@param data any
---@return string
GetOwnedVehicleLabel = function(data)
local model = json.decode(data.vehicle).model
return GetLabelText(GetDisplayNameFromVehicleModel(model))
end
---@param title? string
---@param description? string
---@param id? string
SuccessNotify = function(title, description, id)
local data = {
position = 'top',
style = {
width = 'fit-content',
backgroundColor = '#000000',
borderRadius = '0.5rem',
color = '#ffffff',
['.description'] = {
color = '#cccccc'
}
},
icon = 'check',
iconColor = '#3fad00'
}
data.title = title or nil
data.description = description or nil
data.id = id or nil
lib.notify(data)
end
---@param title? string
---@param description? string
---@param id? string
InfoNotify = function(title, description, id)
local data = {
position = 'top',
style = {
width = 'fit-content',
backgroundColor = '#000000',
borderRadius = '0.5rem',
color = '#ffffff',
['.description'] = {
color = '#cccccc'
}
},
icon = 'info',
iconColor = '#4287f5'
}
data.title = title or nil
data.description = description or nil
data.id = id or nil
lib.notify(data)
end
---@param title? string
---@param description? string
---@param id? string
FailNotify = function(title, description, id)
local data = {
position = 'top',
style = {
width = 'fit-content',
backgroundColor = '#000000',
borderRadius = '0.5rem',
color = '#ffffff',
['.description'] = {
color = '#cccccc'
}
},
icon = 'ban',
iconColor = '#C53030'
}
data.title = title or nil
data.description = description or nil
data.id = id or nil
lib.notify(data)
end