$4 deerBlacklister | QBCore/Standalone

stuff

A simple to configure, reliable, and low impact blacklister that supports QBCore, Ace Permissions, or Identifiers

Purchase: Tebex ($4)

Features:

  • Easy to understand, and easy to set up configuration file
  • Vehicle Blacklist (By model name, or vehicle category)
    ➣ Configurable to either kick the user out of the car, or delete it.
    ➣ Configurable to only check the driver, or all passengers (Example usage: Staff only vehicles)
  • Ped Blacklist
    ➣ Configurable to set to a specific ped for each blacklist
  • Item Blacklist
    ➣ You can set up QBCore/ESX items to be removed if a user lacks permission to have it automatically
  • Weapon Blacklist
  • Weapon Component Blacklist

Planned Updates

  • Ped Clothing/Component Blacklisting
  • Vehicle Component/Livery Blacklisting

Optimization
This scripts main focus is optimization, there are plenty of blacklisters out there but the majority of which lack optimization. This script idles at 0.00ms which peaks to 0.05ms when not idle. I will continue to optimize this script where possible, when possible.

Disclaimer
This script is using the FiveM/Tebex escrow system!

Config

Summary
framework = {
    esx = "es_extended", -- If you are using ESX, please change this to the name of your es_extended resource
    qbcore = "qb-core" -- If you are using QBCore, please change this to the name of your qb-core resource
},

--[[
    VEHICLE BLACKLIST
        This is the vehicle blacklist, it will prevent players from spawning blacklisted vehicles
]]
vehicleBlacklist = {
    --[[ 
        ALLOWED PERMISSIONS - Used to allow specific people to bypass the blacklist
            jobs: The job name that can bypass the blacklist                    (Ex: 'police', 'ambulance')
            jobtypes: The job type that can bypass the blacklist                (Ex: 'leo', 'ems')
            acePermissions: The ace permission that can bypass the blacklist    (Ex: 'blacklister.bypass')
            identifiers: The identifier that can bypass the blacklist           (Ex: 'steam:123456789', 'license:123456789')
        OPTIONS - The options for the blacklist
            checkSpawn: If the script should check permissions when the vehicle is spawned (server-side)
            deleteVehicle:
                enabled: If the script should delete the vehicle if the user does not have permission
                driverOnly: If the script should only delete the vehicle if the user is the driver (Ignored if onlyCheckDriver is true)
            onlyCheckDriver: If the script should only check the driver of the vehicle
            notify: If the script should notify the user if they do not have permission
            notifyMessage: The message to notify the user if they do not have permission
            preventAI: If the script should prevent AI from spawning the vehicle
        BLACKLISTED VEHICLES - The vehicles that are blacklisted
            Accepts: A table of; model names, vehicle classes, vehicle hashes   (Ex: 'adder', 'trains')
    ]]--
    {   
        allowedPermissions = {
            jobs = { "ownerJob" },
            jobtypes = { "owner" },
            acePermissions = { "blacklist.bypass" },
            identifiers = { 'discord:123454', "steam:1231244", "license:2312313" }
        },
        options = {
            checkSpawn = true,
            deleteVehicle = {
                enabled = true,
                driverOnly = true,
            },
            onlyCheckDriver = false,
            notify = true,
            notifyMessage = "You are not permitted to spawn that vehicle",
            preventAI = true,
        },
        blacklistedVehicles = { 
            "dinghy5", "kosatka", "patrolboat", "cerberus", "cerberus2", "cerberus3", "phantom2", "terbyte", "akula", "annihilator", "buzzard",
            "havok", "hunter", "savage", "annihilator2", "valkyrie2", "apc", "barrage", "chernobog", "halftrack", "khanjali", "minitank", "rhino",
            "thruster", "trailersmall2", "deathbike", "deathbike2", "deathbike3", "oppressor", "oppressor2", "caracara", "insurgent", "technical3" 
        }
    },
},

--[[
    PED/CHARACTER BLACKLIST
        When a player changes their ped or character it will check if they have permission
        to use the ped (if it is blacklisted) and if not it will reset them to the specified resetPed
]]
pedBlacklist = {
    --[[
        ALLOWED PERMISSIONS - Used to allow specific people to bypass the blacklist
            jobs: The job name that can bypass the blacklist                    (Ex: 'police', 'ambulance')
            jobtypes: The job type that can bypass the blacklist                (Ex: 'leo', 'ems')
            acePermissions: The ace permission that can bypass the blacklist    (Ex: 'blacklister.bypass')
            identifiers: The identifier that can bypass the blacklist           (Ex: 'steam:123456789', 'license:123456789')
        OPTIONS - The options for the blacklist
            notify: If the script should notify the user if they do not have permission
            notifyMessage: The message to notify the user if they do not have permission
            preventAI: If the script should prevent AI from spawning the ped
            resetPed: The ped to reset the ped to if they do not have permission
        BLACKLISTED PEDS - The peds that are blacklisted
            Accepts: A table of; model names, ped hashes                        (Ex: 'a_m_y_skater_01', 'a_m_y_skater_01')
    ]]
    {
        allowedPermissions = {
            jobs = { "ownerJob" },
            jobtypes = { "owner" },
            acePermissions = { "blacklist.bypass" },
            identifiers = { 'discord:123454', "steam:1231244", "license:2312313" }
        },
        options = {
            notify = true,
            notifyMessage = "You are not permitted to spawn that ped",
            preventAI = true,
            resetPed = "a_m_y_skater_01"
        }, 
        blacklistedPeds = {
            "a_m_m_acult_01","a_m_y_acult_02","a_m_o_acult_01","a_f_m_fatcult_01","a_c_boar","a_c_chickenhawk","a_c_chimp","a_c_chop","a_c_cormorant",
            "a_c_cow","a_c_coyote","a_c_crow","a_c_dolphin","s_f_y_stripper_01","s_f_y_stripperlite","s_f_y_sheriff_01","s_f_y_ranger_91","mp_m_marston_01",
            "mp_f_misty_91","csb_porndudes","a_c_fish","a_c_hen","a_c_humpback","a_c_husky","a_c_killerwhale","a_c_mtlion","a_c_pigeon","a_c_rabbit_01",
            "a_c_rat","a_c_retriever","a_c_rhesus","a_f_y_topless_01","s_m_y_sheriff_01", "u_m_y_staggrm_91","s_m_m_paramedic_01","s_f_y_stripper_02", 
            "mp_m_niko_01", "mp_m_shopkeep_01", "mp_m_fibsec_01","mp_f_stripperlite","a_c_seagull","a_c_sharkhammer","a_c_stingray","a_c_westy",
            "cs_orleans","mp_m_cocaine_01","u_m_y_justin","csb_cop","s_m_y_ranger_01","s_m_y_hwaycop_01","s_m_y_fireman_01","s_m_y_cop_01",
            "s_m_m_snowcop_01","s_m_m_prisguard_01","s_f_y_cop_01","ig_joeminuteman","csb_stripper_01","csb_stripper_02"
        }
    }
},

--[[
    WEAPON BLACKLIST
        When a player equips a weapon it will check if they have permission
        to use the weapon (if it is blacklisted) and if not it will delete the weapon
]]
weaponBlacklist = {
    --[[
        ALLOWED PERMISSIONS - Used to allow specific people to bypass the blacklist
            jobs: The job name that can bypass the blacklist                    (Ex: 'police', 'ambulance')
            jobtypes: The job type that can bypass the blacklist                (Ex: 'leo', 'ems')
            acePermissions: The ace permission that can bypass the blacklist    (Ex: 'blacklister.bypass')
            identifiers: The identifier that can bypass the blacklist           (Ex: 'steam:123456789', 'license:123456789')
        OPTIONS - The options for the blacklist
            notify: If the script should notify the user if they do not have permission
            notifyMessage: The message to notify the user if they do not have permission
        BLACKLISTED WEAPONS - The weapons that are blacklisted
            Accepts: A table of; weapon names, weapon hashes                    (Ex: 'WEAPON_RAYCARBINE', 'WEAPON_RPG')
    ]]
    {
        allowedPermissions = {
            jobs = { "ownerJob" },
            jobtypes = { "owner" },
            acePermissions = { "blacklist.bypass" },
            identifiers = { 'discord:123454', "steam:1231244", "license:2312313" }
        },
        options = {
            notify = true,
            notifyMessage = "You are not permitted to use that weapon",
        },
        blacklistedWeapons = {
            "WEAPON_RAYCARBINE","WEAPON_RPG","WEAPON_MINIGUN","WEAPON_RAILGUN","WEAPON_HOMINGLAUNCHER","WEAPON_COMPACTLAUNCHER","WEAPON_GRENADELAUNCHER",
            "WEAPON_RAYMINIGUN","WEAPON_STINGER","WEAPON_RAYPISTOL","WEAPON_REMOTESNIPER","WEAPON_STICKYBOMB","WEAPON_PROXMINE","WEAPON_PIPEBOMB",
            "WEAPON_GRENADE","WEAPON_FIREWORK"
        }
    }
},

--[[
    WEAPON COMPONENT BLACKLIST
        When a player equips a weapon component it will check if they have permission
        to use the weapon component (if it is blacklisted) and if not it will delete the weapon component
]]
weaponComponentBlacklist = {
    --[[
        ALLOWED PERMISSIONS - Used to allow specific people to bypass the blacklist
            jobs: The job name that can bypass the blacklist                    (Ex: 'police', 'ambulance')
            jobtypes: The job type that can bypass the blacklist                (Ex: 'leo', 'ems')
            acePermissions: The ace permission that can bypass the blacklist    (Ex: 'blacklister.bypass')
            identifiers: The identifier that can bypass the blacklist           (Ex: 'steam:123456789', 'license:123456789')
        OPTIONS - The options for the blacklist
            notify: If the script should notify the user if they do not have permission
            notifyMessage: The message to notify the user if they do not have permission
        BLACKLISTED COMPONENTS - The weapon components that are blacklisted
            Accepts: A table of; weapon component names, weapon component hashes (Ex: 'COMPONENT_AT_AR_FLSH', 'COMPONENT_AT_AR_AFGRIP')
    ]]
    {
        allowedPermissions = {
            jobs = { "ownerJob" },
            jobtypes = { "owner" },
            acePermissions = { "blacklist.bypass" },
            identifiers = { 'discord:123454', "steam:1231244", "license:2312313" }
        },
        options = {
            notify = true,
            notifyMessage = "You are not permitted to use that weapon component",
        },
        blacklistedComponents = {
            "COMPONENT_REVOLVER_MK2_CLIP_INCENDIARY","COMPONENT_SNSPISTOL_MK2_CLIP_INCENDIARY",
            "COMPONENT_PISTOL_MK2_CLIP_INCENDIARY","COMPONENT_SMG_MK2_CLIP_INCENDIARY","COMPONENT_PUMPSHOTGUN_MK2_CLIP_INCENDIARY",
            "COMPONENT_PUMPSHOTGUN_MK2_CLIP_EXPLOSIVE","COMPONENT_BULLPUPRIFLE_MK2_CLIP_INCENDIARY","COMPONENT_SPECIALCARBINE_MK2_CLIP_INCENDIARY",
            "COMPONENT_ASSAULTRIFLE_MK2_CLIP_INCENDIARY","COMPONENT_CARBINERIFLE_MK2_CLIP_INCENDIARY","COMPONENT_COMBATMG_MK2_CLIP_INCENDIARY",
            "COMPONENT_MARKSMANRIFLE_MK2_CLIP_INCENDIARY","COMPONENT_HEAVYSNIPER_MK2_CLIP_INCENDIARY","COMPONENT_HEAVYSNIPER_MK2_CLIP_EXPLOSIVE"
        }
    }
},

--[[
    ITEM BLACKLIST
        Checks a users inventory (QBCore Only) for items that are marked as blacklisted, 
        If the user does not have permissiont to have the item it will be removed from their inventory
]]
itemBlacklist = {
    --[[ 
        ALLOWED PERMISSIONS - Used to allow specific people to bypass the blacklist
            jobs: The job name that can bypass the blacklist                    (Ex: 'police', 'ambulance')
            jobtypes: The job type that can bypass the blacklist                (Ex: 'leo', 'ems')
            acePermissions: The ace permission that can bypass the blacklist    (Ex: 'blacklister.bypass')
            identifiers: The identifier that can bypass the blacklist           (Ex: 'steam:123456789', 'license:123456789')
        OPTIONS - The options for the blacklist
            notify: If the script should notify the user if they do not have permission
            notifyMessage: The message to notify the user if they do not have permission
        BLACKLISTED ITEMS - The items that are blacklisted
    ]]--
    {
        allowedPermissions = {
            jobs = { "ownerJob" },
            jobtypes = { "owner" },
            acePermissions = { "blacklist.bypass" },
            identifiers = { 'discord:123454', "steam:1231244", "license:2312313" }
        },
        options = {
            notify = true,
            notifyMessage = "You are not permitted to use that item",
        },
        itemBlacklist = {
            "lockpick"
        }
    }
}, 

--[[
    NOTIFY
        Used to notify the user
        isServer: If the notify is from the server or client
        msg: The message to notify the user
        source: The source of the notify (Only used if isServer is true)
]]
Notify = function(isServer, msg, source)
    if isServer then
        -- notify from the client
        TriggerClientEvent('chat:addMessage', source, {
            color = { 128, 128, 128},
            args = {"^4[^1deerBlacklister]^7 "..msg}
        })
    else
        -- notify from the client
        TriggerEvent('chat:addMessage', {
            color = { 128, 128, 128},
            args = {"^4[^1deerBlacklister]^7 "..msg}
        })
    end
end,

}

My Other Work: deerRPChat

Code is accessible No, Config Only
Subscription-based No
Lines (approximately) 400-500
Requirements None
Support Yes
1 Like

If I have a clothing to items script would this black list prevent people from wearing the clothes even though it’s an item?

As of right now the script does not support blacklisting clothes/ped variants. I do have plans to add this feature/support in the future however!

3/12/2023 Minor Update

  • Added the ability to blacklist vehicle categories.
    ➣ Meaning you can blacklist Sedans for instance

3/14/2023 Update

  • You can now blacklist QBCore Items
    ➣ For instance you can make ‘firstaid’ only accessible to EMS
  • Added update checking

I purchased the initial release of deerBlacklister, however the download file leads to an empty MEGA Folder. How do I access the updated version?

Hello jack, unfortunately I have no way of verifying previous purchases as the old tebex store was deleted.

I have also rewritten the script from scratch as the old version was equally as lost. I can send you a one time download for the current escrowed version if you can provide proof of purchase in a direct message.

3/15/2023 Update

  • Added ESX Support
  • Added Weapon Blacklisting
  • Added Weapon Component Blacklisting
  • Minor Performance improvements
  • Made the config easier to understand