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
| Parameter | Type | Required | Description |
|---|---|---|---|
data | table | Yes | Log payload (see structure below) |
data.type | string | Yes | Log type key. Must match a key in ServerConfig.Logs (e.g. 'StartRobbery') |
data.source | integer|nil | No | Player server ID. Used to append identifiers when ServerConfig.UseIdentifiers = true |
data.message | string|nil | No | Plain text message sent as the Discord content field |
data.embed | table|nil | No | Discord embed object. If provided, sent as an embed instead of plain content |
data.avatar_url | string|nil | No | Custom 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.