Installation
This guide will walk you through installing prp-staffevents on your FiveM server.
Installation steps
1
Download the resource
Download
prp-staffevents from the CFX portal and place it in your resources folder.2
Add to server.cfg
Add
prp-staffevents to your server.cfg after all dependencies. ensure oxmysql
ensure ox_lib
ensure prp-bridge
ensure prp-staffevents3
Optional: webhook
Set
LogWebhookUrl in editable/sv_config.lua to log event activity to Discord.4
Configure animations
Edit
editable/animations.json to configure the animations available for event peds.5
Configure minigames
Edit
editable/minigames.json to configure which minigames can be triggered from event objects.6
Configure weapons
Edit
editable/weapons.json to configure which weapons can be assigned to event peds.7
Grant staff access
Grant staff access in-game using the permission system — see Permissions.
Database
The required tables are created automatically on first server start:
sql
CREATE TABLE IF NOT EXISTS staff_events (
id INT AUTO_INCREMENT PRIMARY KEY,
name TEXT NOT NULL,
enabled TINYINT(1) DEFAULT 1 NOT NULL,
boundingBoxMargin FLOAT DEFAULT 0 NOT NULL,
createdBy TEXT NOT NULL,
lastUpdatedAt DATETIME DEFAULT CURRENT_TIMESTAMP() NOT NULL,
createdAt DATETIME DEFAULT CURRENT_TIMESTAMP() NOT NULL
);
CREATE TABLE IF NOT EXISTS staff_event_objects (
id INT AUTO_INCREMENT PRIMARY KEY,
sceneId INT NOT NULL,
model TEXT NOT NULL,
coords LONGTEXT NOT NULL,
enabled TINYINT(1) DEFAULT 1 NOT NULL,
rotation LONGTEXT,
type TEXT NOT NULL,
settings LONGTEXT
);
CREATE TABLE IF NOT EXISTS staff_events_access (
stateId TEXT NOT NULL,
permissions LONGTEXT NOT NULL,
addedBy TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS staff_event_stashes (
id INT AUTO_INCREMENT PRIMARY KEY,
name TEXT NOT NULL,
items LONGTEXT NOT NULL
);