Coder Social home page Coder Social logo

dynamicblacklist's People

Contributors

mrgriefs avatar p4r4norm4l avatar

Watchers

 avatar

Forkers

p4r4norm4l

dynamicblacklist's Issues

Global vehicle blacklist only works for first vehicle

Setting up the config is pretty straight forward, un but I can only block the first vehicle in the list
['vehicles'] = { -- vehicles that are locked for everyone (including admins) 'stockade3', 'banshee2',
I can spawn in the banshee2 but not the stockade, is there anyway I can fix this ?

Weapons not being blacklisted

Hello, for some reason the script isn't blacklisting the railgun even though its supposed to be blacklisted for everyone including owners. I can spawn it and walk around with it as well as shoot it without any problems and my permissions group is management not owner so I'm not sure why I'm allowed to have the weapon if its supposed to be blacklisted for everyone including owners.

Here is my config file:

Restricted = {
  vehicles = {
    -- vehicles that are locked for everyone (including owners)
    'stockade3',
    -- vehicles only owners can use
    owner = {},
    -- vehicles only co-owners (and above) can use
    coOwner = {},
    -- vehicles only management (and above) can use
    management = {},
    -- vehicles only head of staff (and above) can use
    headstaff = {},
    -- vehicles only head admins (and above) can use
    headadmin = {},
    -- vehicles only admins can use
    admin = {},
    -- vehicles only head moderators (and above) can use
    headmod = {},
    -- vehicles only moderators (and above) can use
    moderator = {},
    -- vehicles only Law Enforcement (and above) can use
    LEO = {},
    -- vehicles only Fire Department and EMS (and above) can use
    EMS = {},
    -- vehicles only Community Officers (and above) can use
    CO = {},
  },

  peds = {
    -- peds that are locked for everyone (including owners)
    'mp_f_stripperlite',
    owner = {},
    -- peds only co-owners (and above) can use
    coOwner = {},
    -- peds only management (and above) can use
    management = {},
    -- peds only head of staff (and above) can use
    headstaff = {},
    -- peds only head admins (and above) can use
    headadmin = {},
    -- peds only admins can use
    admin = {},
    -- peds only head moderators (and above) can use
    headmod = {},
    -- peds only moderators (and above) can use
    moderator = {},
    -- peds only Law Enforcement (and above) can use
    LEO = {},
    -- peds only Fire Department and EMS (and above) can use
    EMS = {},
    -- peds only Community Officers (and above) can use
    CO = {},
  },

  weapons = {
    -- weapons that are locked for everyone (including owners)
    'WEAPON_RAILGUN',
    owner = {},
    -- weapons only co-owners (and above) can use
    coOwner = {},
    -- weapons only management (and above) can use
    management = {},
    -- weapons only head of staff (and above) can use
    headstaff = {},
    -- weapons only head admins (and above) can use
    headadmin = {
      'WEAPON_PISTOL_MK2',
      'WEAPON_SNSPISTOL_MK2',
      'WEAPON_REVOLVER_MK2',
      'WEAPON_SMG_MK2',
      'WEAPON_PUMPSHOTGUN_MK2',
      'WEAPON_ASSAULTRIFLE_MK2',
      'WEAPON_CARBINERIFLE_MK2',
      'WEAPON_SPECIALCARBINE_MK2',
      'WEAPON_BULLPUPRIFLE_MK2',
      'WEAPON_COMBATMG_MK2',
      'WEAPON_HEAVYSNIPER_MK2',
      'WEAPON_MARKSMANRIFLE_MK2',
      'WEAPON_RPG',
      'WEAPON_GRENADELAUNCHER',
    --  'WEAPON_RAILGUN',
      'WEAPON_HOMINGLAUNCHER',
      'WEAPON_COMPACTLAUNCHER',
      'WEAPON_RAYMINIGUN',
      'WEAPON_EMPLAUNCHER',
      'WEAPON_GRENADE',
      'WEAPON_STICKYBOMB',
      'WEAPON_PROXMINE',
      'WEAPON_PIPEBOMB',
    },
    -- weapons only admins can use
    admin = {},
    -- weapons only head moderators (and above) can use
    headmod = {
      'WEAPON_HEAVYSNIPER',
      'WEAPON_SNIPERRIFLE',
    },
    -- weapons only moderators (and above) can use
    moderator = {
      'WEAPON_APPISTOL',
      'WEAPON_ADVANCEDRIFLE',
      'WEAPON_ASSAULTSMG',
      'WEAPON_ASSAULTSHOTGUN',
      'WEAPON_BZGAS',
      'WEAPON_BALL',
      'WEAPON_BATTLEAXE',
      'WEAPON_BOTTLE',
      'WEAPON_BULLPUPRIFLE',
      'WEAPON_BULLPUPSHOTGUN',
      'WEAPON_COMBATMG',
      'WEAPON_CROWBAR',
      'WEAPON_DAGGER',
      'WEAPON_DBSHOTGUN',
      'WEAPON_FIREWORK',
      'WEAPON_FLAREGUN',
      'WEAPON_GOLFCLUB',
      'WEAPON_GUSENBERG',
      'WEAPON_HAMMER',
      'WEAPON_HATCHET',
      'WEAPON_HEAVYSHOTGUN',
      'WEAPON_KNIFE',
      'WEAPON_KNUCKLE',
      'WEAPON_MG',
      'WEAPON_MACHETE',
      'WEAPON_MARKSMANPISTOL',
      'WEAPON_MACHINEPISTOL',
      'WEAPON_MARKSMANRIFLE',
      'WEAPON_MINISMG',
      'WEAPON_MINIGUN',
      'WEAPON_MOLOTOV',
      'WEAPON_MUSKET',
      'WEAPON_PETROLCAN',
      'WEAPON_POOLCUE',
      'WEAPON_REVOLVER',
      'WEAPON_SMG',
      'WEAPON_SNSPISTOL',
      'WEAPON_SNOWBALL',
      'WEAPON_SPECIALCARBINE',
      'WEAPON_AUTOSHOTGUN',
      'WEAPON_SWITCHBLADE',
      'WEAPON_VINTAGEPISTOL',
      'WEAPON_WRENCH',
    },
    -- weapons only Law Enforcement (and above) can use
    LEO = {},
    -- weapons only Fire Department and EMS (and above) can use
    EMS = {},
    -- weapons only Community Officers (and above) can use
    CO = {},
  },
}

-- Banned weapon ammunition types. Only valid for Mk II weapons. See ammotypes.lua
WeaponAmmoBannedTypes = {}
-- WeaponAmmoBannedTypes = {
--   table.unpack(AmmoFMJ),
--   table.unpack(AmmoAP),
--   table.unpack(AmmoIncendiary),
-- }

-- You can modify the ace prefix here
Prefix = 'blacklist'

-- Instead of a blacklist, you can make this a whitelist
Inverted = false

-- Whether the vehicle blacklist only kicks them from
-- the vehicle if they're in the driver's seat
VehicleDriverBlacklist = true

Inherits = { -- The order to inherit from. You can also do this manually by adding 'add_ace dblacklist.admin dblacklist.moderator allow' etc for each ace
  ['owner'] = 'coOwner',
  ['coOwner'] = 'management',
  ['management'] = 'headstaff',
  ['headstaff'] = 'headadmin',
  ['headadmin'] = 'admin',
  ['admin'] = 'headmod',
  ['headmod'] = 'moderator',
  ['moderator'] = 'LEO',
  ['LEO'] = 'EMS',
  ['EMS'] = 'CO',
}

-- Once done configuring, add 'add_ace group.admin dblacklist.admin'
-- and 'add_ace group.moderator dblacklist.moderator' to your server.cfg

Can't get it to work again

So i've updated the vehicle list because it was out of date but, I cannot get the vehicles to be restricted.

Despawns vehicles regardless of ace permission

Having the dblacklist.owner ace still blacklists the owner vehicles.

Config
Restricted = {
    vehicles = {
        -- vehicles that are locked for everyone (including admins)
        
        
        -- vehicles only admins can use
        owner = {
            'phantom2',
            'hauler2',
            'cerberus',
            'cerberus2',
            'cerberus3',
            'dinghy5',
            'kosatka',
            'patrolboat',
            'tug',
            'boxville5',
            'handler',
            'bruiser',
            'bruiser2',
            'bruiser3',
            'caracara',
            'dune3',
            'insurgent',
            'insurgent3',
            'marshall',
            'menacer',
            'monster',
            'monster3',
            'monster4',
            'monster5',
            'nightshark',
            'technical',
            'technical2',
            'technical3',
            'kuruma2',
            'schafter5',
            'oppressor',
            'oppressor2',
            'vigilante',
            'voltic2',
            'scramjet',
            'brickade',
            'dukes2',
            'trailerlarge',
            'apc',
            'barrage',
            'chernobog',
            'halftrack',
            'khanjali',
            'rhino',
            'scarab',
            'scarab2',
            'scarab3',
            'thruster',
            'trailersmall2',
            'pounder2',
            'terbyte',
            'ambulance',
            'fbi',
            'fbi2',
            'firetruk',
            'lguard',
            'pbus',
            'police',
            'police2',
            'police3',
            'police4',
            'policeb',
            'policeold1',
            'policeold2',
            'policet',
            'polmav',
            'pranger',
            'predator',
            'riot',
            'riot2',
            'sheriff',
            'sheriff2',
            'alphaz1',
            'avenger',
            'avenger2',
            'besra',
            'blimp',
            'blimp2',
            'blimp3',
            'bombushka',
            'cargoplane',
            'cuban800',
            'dodo',
            'duster',
            'howard',
            'hydra',
            'jet',
            'lazer',
            'luxor',
            'luxor2',
            'mammatus',
            'microlight',
            'miljet',
            'mogul',
            'molotok',
            'nimbus',
            'nokota',
            'pyro',
            'rogue',
            'seabreeze',
            'shamal',
            'starling',
            'strikeforce',
            'stunt',
            'titan',
            'tula',
            'velum',
            'velum2',
            'vestra',
            'volatol',
            'akula',
            'oppressor',
            'oppressor2',
            'annihilator',
            'buzzard',
            'buzzard2',
            'cargobob',
            'cargobob2',
            'cargobob3',
            'cargobob4',
            'frogger',
            'frogger2',
            'havok',
            'hunter',
            'maverick',
            'polmav',
            'savage',
            'seasparrow',
            'skylift',
            'supervolito',
            'supervolito2',
            'swift',
            'swift2',
            'valkyrie',
            'valkyrie2',
            'volatus',
            'rumpo3',
            'rebel',
            'zr380',
            'zr3802',
            'zr3803',
            'dominator4',
            'dominator5',
            'dominator6',
            'ruiner2',
            'tampa3',
            'baller5',
            'baller6',
            'contender',
            'xls2',
            'cog552',
            'cognoscenti2',
            'limo2',
            'schafter6',
            'cablecar',
            'freight',
            'freightcar',
            'freightcont1',
            'freightcont2',
            'freightgrain',
            'metrotrain',
            'tankercar',
        },
        -- vehicles only moderators (and above) can use
        leo = {
            'code310char',
            'code314char',
            'code314taho',
            'code316impa',
            'code318char',
            'police',
            'police2',
            'police3',
            'police4',
            'code318taho',
            'code320exp',
            'code3camero',
            'code3cap',
            'code3silver',
            'code3cvpi',
            'code3f150',
            'code3gator',
            'code3mustan',
            'code3ram',
            'code3fpis',
            'sheriff',
            'sheriff2',
            'chgr',
            'cvpi',
            'durango',
            'ram',

        },
        construction = {
            'bulldozer',
            'cutter',
            'dump',

        },
        snowvehicles = {
            'burrito5',
            'tractor3',
            'sadler2',
            'stockade3',
            'rancherxl2',
            'mesa2',
            'asea2',
            'emperor3',
        },
    },
    
    peds = {
        admin = {
            'adminped',
        },
        moderator = {
            'modped',
        },
        'mp_f_stripperlite',
    },
    
    weapons = {
        --blacklisted shit


        -- You can also define your own ace permission
        owner = {
            'WEAPON_MARKSMANPISTOL',
            'WEAPON_HOMINGLAUNCHER',
            'WEAPON_COMPACTLAUNCHER',
            'WEAPON_GRENADELAUNCHER',
            'WEAPON_GRENADELAUNCHER_SMOKE',
            'WEAPON_FIREWORK',
            'WEAPON_GRENADE',
            'WEAPON_MOLOTOV',
            'WEAPON_BZGAS',
            'GADGET_NIGHTVISION',
            'WEAPON_MINIGUN',
            'WEAPON_PROXMINE',
            'WEAPON_RPG',
            'WEAPON_RAILGUN',
            'WEAPON_PIPEBOMB',
            'WEAPON_STICKYBOMB',
            'WEAPON_AUTOSHOTGUN',
        },

        leo = {
            'WEAPON_HEAVYSNIPER',
            'WEAPON_MARKSMANRIFLE',
            'WEAPON_PISTOL50',
            'WEAPON_SMOKEGRENADE',
            'WEAPON_SNIPERRIFLE',
            'WEAPON_HEAVYPISTOL',
            'WEAPON_HEAVYSHOTGUN',
            'WEAPON_MG',
            'WEAPON_COMBATMG',
            'WEAPON_ASSAULTSHOTGUN',

        },

        mkii = {

            'WEAPON_PISTOL_MK2',
            'WEAPON_SNSPISTOL_MK2',
            'WEAPON_REVOLVER_MK2',
            'WEAPON_SMG_MK2',
            'WEAPON_PUMPSHOTGUN_MK2',
            'WEAPON_ASSAULTRIFLE_MK2',
            'WEAPON_CARBINERIFLE_MK2',
            'WEAPON_SPECIALCARBINE_MK2',
            'WEAPON_BULLPUPRIFLE_MK2',
            'WEAPON_COMBATMG_MK2',
            'WEAPON_HEAVYSNIPER_MK2',
            'WEAPON_MARKSMANRIFLE_MK2',
        },

        heavy = {
                    
            'WEAPON_HEAVYPISTOL',
            'WEAPON_HEAVYSHOTGUN',
            'WEAPON_MG',
            'WEAPON_COMBATMG',
        },

        shotgun = {
                    
        'WEAPON_ASSAULTSHOTGUN',
        'WEAPON_HEAVYSHOTGUN',
        'WEAPON_BULLPUPSHOTGUN',
        },

        -- everyone is allowed theses weapons
        everyone = {
            'WEAPON_APPISTOL',
            'WEAPON_ADVANCEDRIFLE',
            'WEAPON_ASSAULTSMG',
            'WEAPON_ASSAULTRIFLE',
            'WEAPON_HAMMER',
            'WEAPON_BAT',
            'WEAPON_BALL',
            'WEAPON_FLARE',
            'WEAPON_UNARMED',
            'WEAPON_KNIFE',
            'WEAPON_NIGHTSTICK',
            'WEAPON_GOLFCLUB',
            'WEAPON_CROWBAR',
            'WEAPON_PISTOL',
            'WEAPON_COMBATPISTOL',
            'WEAPON_MICROSMG',
            'WEAPON_SMG',
            'WEAPON_CARBINERIFLE',
            'WEAPON_PUMPSHOTGUN',
            'WEAPON_SAWNOFFSHOTGUN',
            'WEAPON_STUNGUN',
            'WEAPON_GUSENBERG',
            'WEAPON_BULLPUPRIFLE',
            'WEAPON_DAGGER',
            'WEAPON_VINTAGEPISTOL',
            'WEAPON_FIREEXTINGUISHER',
            'WEAPON_PETROLCAN',
            'WEAPON_SPECIALCARBINE',
            'WEAPON_SNSPISTOL',
            'WEAPON_BOTTLE',
            'WEAPON_SNOWBALL',
            'WEAPON_FLAREGUN',
            'WEAPON_COMBATPDW',
            'WEAPON_KNUCKLE',
            'WEAPON_HATCHET',
            'WEAPON_MACHETE',
            'WEAPON_MACHINEPISTOL',
            'WEAPON_HATCHET',
            'WEAPON_SWITCHBLADE',
            'WEAPON_DBSHOTGUN',
            'WEAPON_COMPACTRIFLE',
            'WEAPON_BATTLEAXE',
            'WEAPON_POOLCUE',
            'WEAPON_WRENCH',
            'WEAPON_REVOLVER',
            'WEAPON_MINISMG',
            'WEAPON_BATTLEAXE',
        },
    },
}

-- Banned weapon ammunition types. Only valid for Mk II weapons. See ammotypes.lua
WeaponAmmoBannedTypes = {} 
-- WeaponAmmoBannedTypes = {
--     table.unpack(AmmoFMJ),
--     table.unpack(AmmoAP),
--     table.unpack(AmmoIncendiary),
-- }

-- You can modify the ace prefix here
Prefix = 'dblacklist'

-- Instead of a blacklist, you can make this a whitelist
Inverted = false

-- If your server uses a vehicle spawner/menu, enable this to
-- automatically delete blacklisted vehicles a player spawns
VehicleNoSpawn = true

-- Whether the vehicle blacklist only kicks them from
-- the vehicle if they're in the driver's seat
VehicleDriverBlacklist = true

Inherits = { -- The order to inherit from. You can also do this manually by adding 'add_ace dblacklist.admin dblacklist.moderator allow' etc for each ace
    
}

-- Once done configuring, add 'add_ace group.admin dblacklist.admin'
-- and 'add_ace group.moderator dblacklist.moderator' to your server.cfg

Questions about ammo types

I was needing a little bit of help with the blacklisting of ammo types. I am wanting to blacklist all ammo types, but i cant figure out how to do it. Thank you for you help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.