FiveScripts
  • FREE RELEASES
    • Clothing Permission System
      • Installation
      • Config
Powered by GitBook
On this page
  • Import the provided SQL file into your database.
  • For QBCore and Standalone System
  • The script will automatically detect and configure the appropriate framework.
  • Configure your preferred notification system in the config file.
  1. FREE RELEASES
  2. Clothing Permission System

Installation

Import the provided SQL file into your database.

CREATE TABLE IF NOT EXISTS `fs_exclusives` (
  `type` varchar(50) NOT NULL,
  `index` int(11) NOT NULL DEFAULT 0,
  `identifiers` longtext NOT NULL,
  `owner` tinyint(4) NOT NULL DEFAULT 0,
  `drawable` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `sex` varchar(1) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

For QBCore and Standalone System

Add the following line to your server.cfg file. Replace group.admin with the appropriate permission group as needed:

add_ace group.admin "fs-exclusive" allow

The script will automatically detect and configure the appropriate framework.

if GetResourceState("es_extended") ~= "missing" then
    Config.Framework = "esx"
elseif GetResourceState("qb-core") ~= "missing" then
    Config.Framework = "qb"
else
    Config.Framework = "standalone"
end

Configure your preferred notification system in the config file.

You can replace the built-in notification events (esx:showNotification, QBCore:Notify, or ox_lib:notify) with your own system (e.g., my_notify:clientEvent) by enabling Config.UseCustomNotify and modifying the designated sections below.

Config.UseCustomNotify = false

Config.Notify = function(src, msg, type, time)
    if src then
        if Config.UseCustomNotify then
            -- Add your own notification system here
        else
            if Config.Framework == "esx" then
                TriggerClientEvent('esx:showNotification', src, msg)
            elseif Config.Framework == "qb" then
                TriggerClientEvent('QBCore:Notify', src, msg, type, time)
            elseif GetResourceState("ox_lib") ~= "missing" then
                TriggerClientEvent('ox_lib:notify', src, {
                    id = "exclu-clothing"..msg,
                    title = "Notification",
                    description = msg,
                    duration = time,
                    type = type,
                })
            end
        end
    else
        if Config.UseCustomNotify then
            -- Add your own notification system here
        else
            if Config.Framework == "esx" then
                TriggerEvent('esx:showNotification', msg)
            elseif Config.Framework == "qb" then
                TriggerEvent('QBCore:Notify', msg, type, time)
            elseif GetResourceState("ox_lib") ~= "missing" then
                TriggerEvent('ox_lib:notify', {
                    id = "exclu-clothing"..msg,
                    title = "Notification",
                    description = msg,
                    duration = time,
                    type = type,
                })
            end
        end
    end
end
PreviousClothing Permission SystemNextConfig

Last updated 9 days ago