Events
π‘
Server β Client
Trigger UI elements directly from server-side scripts using
TriggerClientEvent β no extra setup required.Server β Client Notify
Instead of calling exports server-side (which doesnβt work cross-resource), use TriggerClientEvent to send notifications to specific players or all players.
Send to a Single Player
local src = source
TriggerClientEvent('mizu_interface:client:Notify', src, {
title = 'BANKING',
message = 'Your salary of $2,500 has been transferred.',
type = 'success',
duration = 6000,
position = 'top-right',
sound = true,
animation = 'slide-right',
showProgress = true
})Broadcast to All Players
Use -1 as the target to send a notification to every player on the server simultaneously.
TriggerClientEvent('mizu_interface:client:Notify', -1, {
title = 'SERVER RESTART',
message = 'The server is restarting in 5 minutes!',
type = 'system',
duration = 15000,
position = 'top-center',
sound = true,
animation = 'bounce-in',
showProgress = true
})π‘
Tip
This is different from the /announce command β it sends a regular notification, not a top-center marquee-style announcement. Use -1 here for urgent system messages without the announcement styling.
txAdmin Event Handling
When Config.Announce.EnableTxAdminOverride = true (default), the server automatically intercepts and styles all txAdmin events through mizu_interface. No additional setup needed.
| txAdmin Event | Type | Behavior |
|---|---|---|
| announcement | error | Broadcasts to all players, cancels native txAdmin style |
| scheduledRestart | warning | Broadcasts restart message to all players |
| playerWarned | warning | Sends warning reason to the targeted player |
| playerKicked | β | Logged only (player is already kicked) |
| playerDirectMessage | info | Sends DM to the targeted player as a notification |
All intercepted events are automatically logged to Discord and/or FiveManage based on your Config.Announce.Logging settings.
Last updated on