NightZoom LogoNightZoom
BJJ Racing Core/BJJ Racing Core v7/Notifications

Notifications Server

Server-side notification system for BJJ Racing Core v7

This page covers server-side notification functionality for BJJ Racing Core v7. Server-side notifications allow you to send messages to specific players or groups of players.

Core Access

Access the core notification system:

local Core = exports.bjj_racingcore:getCore()

Notification Functions

TriggerClientEvent for Notifications

Send notifications to specific players from the server.

TriggerClientEvent('bjj_racingcore:client:notify', source, title, description, type)

Parameters:

  • source: number - Player source ID (or -1 for all players)
  • title: string - Notification title
  • description: string - Notification description (optional)
  • type: string - Notification type ('info', 'success', 'warning', 'error')

Example:

-- Notify specific player
TriggerClientEvent('bjj_racingcore:client:notify', source, 'Race Complete', 'You finished in 2nd place', 'success')

-- Notify all players
TriggerClientEvent('bjj_racingcore:client:notify', -1, 'Server Restart', 'Server restarting in 5 minutes', 'warning')

Server-side notifications are processed and sent to clients immediately. Use timers and threading for delayed or scheduled notifications.

Be mindful of notification spam when sending to all players (-1 source). Consider rate limiting for frequently triggered events.

Server-side notifications allow for rich integration with game events and provide centralized control over player communication.