HKN Works Logo
HKN Works/Docs/hkn-works-resources

Agents can also search and read this documentation through its MCP server.

Installation

Installation

General Setup

  1. Extract the resource into your server's resources folder.
  2. Make sure the folder name is strictly hkn_notify.
  3. Open your server.cfg.
  4. Make sure the default FiveM resources are started before this script.
  5. Add the following line:
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
ensure baseevents

ensure hkn_notify

Usage

You can trigger a notification from any of your client or server scripts.

Client-Side Event

TriggerEvent('hkn_notify:Notify', 'TITLE', 'Your notification message here.', 'success', 5000)

Client-Side Export

exports['hkn_notify']:Notify('TITLE', 'Your notification message here.', 'error', 5000)

Server-Side

TriggerClientEvent('hkn_notify:Notify', source, 'TITLE', 'Your notification message here.', 'info', 5000)

Parameters

Parameter Description
title Title of the notification.
text Message of the notification.
type Notification type: success, error, info, ems, pd, sheriff or fbi.
duration Time on screen in milliseconds. Defaults to 5000 when not provided.

Commands

Command Description
/notifymenu Opens the player settings menu (position and colors).
/testnotify [type] Sends a test notification. Uses success when no type is provided.

Configuration

Below are all available configuration options for hkn_notify.

Language

Select the language used by the settings menu.

Config.Locale = "en"

Update Check

Enable or disable the version check on resource start.

Config.UpdateCheck = true

Change the command used to open the settings menu.

Config.MenuCommand = "notifymenu"

Theme Color

Customize the settings menu theme color.

Config.ThemeColor = "#ff0066"

For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs; this page is available as Markdown.