OrigenNetwork
Docs

Exports · origen_importheist

All exports are registered under the resource name origen_importheist.


Server-side exports

CreateLog(data)void

Sends a structured log entry to a configured Discord webhook. Optionally appends player identifiers to the embed or message.

lua
exports['origen_importheist']:CreateLog(data)

Parameters

ParameterTypeRequiredDescription
datatableYesLog payload (see structure below)
data.typestringYesLog type key. Must match a key in ServerConfig.Logs (e.g. 'StartRobbery')
data.sourceinteger|nilNoPlayer server ID. Used to append identifiers when ServerConfig.UseIdentifiers = true
data.messagestring|nilNoPlain text message sent as the Discord content field
data.embedtable|nilNoDiscord embed object. If provided, sent as an embed instead of plain content
data.avatar_urlstring|nilNoCustom avatar URL for the webhook message

Example — plain message

lua
exports['origen_importheist']:CreateLog({
    type    = 'StartRobbery',
    source  = source,
    message = 'A player started the import heist.',
})

Example — with embed

lua
exports['origen_importheist']:CreateLog({
    type   = 'StartRobbery',
    source = source,
    embed  = {
        title       = 'Import Heist Started',
        description = 'A player entered the warehouse.',
        color       = 16711680, -- red
    },
})

CreateLog validates the webhook URL at call time. If the configured URL for the given type is empty or not a valid Discord webhook, the call is silently ignored.

The data.type value must match a key defined in ServerConfig.Logs inside config/logs/logs.lua. If the key does not exist or has no webhook configured, the log is skipped.


Client-side exports

There are no client-side exports registered by origen_importheist.