📦Installation

Download the Resource

  • Download the priocd resource package

  • Extract the files to your server's resources directory

File Structure

Verify the resource contains the following files:

  • fxmanifest.lua - Resource manifest

  • config.lua - Configuration settings

  • server.lua - Server-side logic

  • client.lua - Client-side logic

  • html/ui.html - User interface file

Add to Server Configuration

1. Add Resource to server.cfg

Open your server.cfg file and add the following line to ensure the resource starts:

ensure priocd

2. Configure Dependencies

Ensure the following resources are running before priocd:

  • TMC Framework Core - Required for framework functions

Configure Allowed Jobs

By default, only certain jobs can set priority cooldowns. Edit config.lua to customize which jobs have access:

Add or remove job names as needed for your server.

Choose Activation Method

The script supports two activation methods that can be enabled independently or together:

Command-Based Activation

Enable command usage in config.lua:

Commands Available:

  • /setcooldown [CooldownType] - Set a specific cooldown (e.g., /setcooldown 10MinCooldown)

  • /clearcooldown - Clear any active cooldown

Radial Menu Activation

Enable radial menu integration in config.lua:

This creates a radial menu option that authorized players can access.

Configure Cooldown Options

The script comes with several pre-configured cooldown options:

You can enable/disable individual cooldown options by setting Enabled = true/false.

Configure Cooldown Types

Define how different cooldown types appear to players:

Customize the messages and colors to match your server's theme.

Configure Logging

Set up the log category for Discord logging:

Ensure this log category is configured in your TMC Framework logging system to receive notifications when cooldowns are set or cleared.

Test the Installation

1. Start the Server

Start your server and verify the resource loads without errors:

2. Test as Authorized Job

  • Join your server

  • Ensure you're on duty with an authorized job (police, medical, etc.)

  • Test setting a cooldown:

    • Via Command: /setcooldown 10MinCooldown

    • Via Radial Menu: Open radial menu → Priority Cooldowns → Select a cooldown

3. Verify UI Display

  • After setting a cooldown, verify the UI notification appears on screen

  • Check that the timer counts down correctly

  • Verify the cooldown clears automatically when the timer expires

4. Test Clearing Cooldown

  • Set any cooldown

  • Clear it using:

    • Via Command: /clearcooldown

    • Via Radial Menu: Priority Cooldowns → Remove Cooldown

  • Verify the UI notification disappears

Integration with Other Scripts

The Priority Cooldowns system exports several functions for integration with other resources:

Server-Side Exports

Client-Side Exports

Example Integration

Block robberies during priority cooldown:

Troubleshooting

Resource Won't Start

  • Verify TMC Framework core is loaded first

  • Check console for error messages

  • Ensure all files are present in the resource folder

UI Not Displaying

  • Check browser console (F8 in-game) for JavaScript errors

  • Verify html/ui.html exists in the resource

  • Ensure NUI is not disabled on your server

Radial Menu Not Showing

  • Verify radialmenu resource is installed and running

  • Check that PrioCD.Activation.Radial.Enabled = true

  • Ensure you're on duty with an allowed job

  • Try restarting both tmc-priocd and radialmenu

Commands Not Working

  • Verify PrioCD.Activation.Command.Enabled = true

  • Check that you have the required permission level

  • Ensure you're using the correct command syntax

Cooldown Not Clearing Automatically

  • Check server console for errors

  • Try manually clearing with /clearcooldown and check if error appears

Discord Logging Setup

The script logs all cooldown actions to Discord. Ensure your TMC Framework logging is configured:

  1. Configure Log Category - Add 'priocd' to your logging categories

  2. Set Webhook - Configure the webhook URL for the priority cooldown logs

  3. Test Logging - Set a cooldown and verify the log appears in Discord

Example log entry includes:

  • Player name (Steam)

  • Citizen ID

  • Character name

  • Cooldown type

  • Duration (if applicable)

Next Steps

Once installation is complete, proceed to the Configuration section to customize cooldown durations, types, and appearance, or check the FAQ for common questions.

Last updated