Skip to content

Usage ​

Event ​

From Client ​

lua
TriggerServerEvent('csms_log', msg, webhook, color, target)

⚠️ Note

Client-side triggering is not recommended, as the webhook may be intercepted or exposed.

From Server ​

lua
TriggerEvent('csms_log', msg, webhook, color, target, source)

Parameters ​

ParameterTypeDescription
msgstringThe log message content
webhookstringDiscord Webhook URL used to send the embed message
colorintegerEmbed color value (optional)
targetintegerServer ID of another related player (optional)
sourceintegerServer ID of the triggering player (required only when called server-side)

Examples ​

Client Example ​

lua
TriggerServerEvent('csms_log', 'Player Login', 'https://discord.com/api/webhooks/...', 3447003, 12)

Server Example ​

lua
TriggerEvent('csms_log', 'Player Logout', 'https://discord.com/api/webhooks/...', 15158332, nil, 34)