[Release] Model Blacklist v1.1

What a Scammer

is there a way we can make them not be able to spawn it but they can drive it if they get given it plsss

The Car Blacklist still doesnt work for me help!!!

Best Blacklist script

Have you gotten the vehicles side of this script to work?

This is for every Weapons recieved from Veichles.

Hello can i quest you what is that ped name? Or how to remove all peds here.

Thank you

nothing i type gets blacklisted, can someone fix this issue?carblacklist.lua (1.6 KB)

Suppose too be 1 word and all caps. Example: RHINO, TANK, OPPRESSOR, OPPRESSOR2

For people that still have problems,and don’t really read comments, @murfasa posted a fix,this is an example,

carblacklist = {

    "RHINO",

    "lazer",

    "Hydra",

    "Dumpster",

    "Buzzard"

}

as you can see,add commas at the end to all,except the last one>
and as you can see, capital letters don’t really make a difference.

is there anyway i can setup to where admins / moderators can have blacklisted cars? or

Yes, you need to put a coma after each model name for each line, except the last model

Hope this helps

1 Like
-- CONFIG --

-- Blacklisted vehicle models
carblacklist = {
	"limo2",
        "tampa3",
        "ruiner3",
        "ruiner2",
        "stromberg",
        "deluxo",
        "ardent",
        "vigilante",
        "voltic2",
        "oppressor",
        "blazer5",
        "caracara",
        "dune5",
        "dune4",
        "dune3",
        "insurgent",
        "insurgent3",
        "nightshark",
        "technical",
        "technical2",
        "technical3",
        "handler",
        "dump",
        "cutter",
        "boxville5",
        "tug",   
        "speeder2",
        "speeder",
        "marquis",
        "skylift",
        "buzzaerd",
        "annihilator",
        "akula2",
        "volatol",
        "titan",
        "lazer",
        "hydar",
        "cargoplane",
        "jet",
        "tankercar",
        "metrotrain",
        "frightgrain",
        "frightcont2",
        "frightcont1",
        "freightcar",
        "freight",
        "cablecar",
        "phantom2",
        "apc",
        "halftrack",
        "chernobog",
        "barrage",
        "trailersmall2",
        "thruster",
        "khanjali",
        "RHINO",
	"blimp3",
	"freecrawler",
	"menacer",
	"mule4",
	"oppressor2",
	"patriot2",
	"pbus2",
	"pounder2",
	"scramjet",
	"speedo4",
	"stafford",
	"strikeforce",
	"swinger",
	"terbyte",
	"bruiser",
	"bruiser2",
	"bruiser3",
	"brutus",
	"brutus2",
	"brutus3",
	"cerberus",
	"cerberus2",
	"cerberus3",
	"clique",
	"deathbike",
	"deathbike2",
	"deathbike3",
	"deveste",
	"deviant",
	"dominator4",
	"dominator5",
	"dominator6",
	"impaler",
	"impaler2",
	"impaler3",
	"impaler4",
	"imperator",
	"imperator2",
	"imperator3",
	"issi4",
	"issi5",
	"issi6",
	"italigto",
	"monster3",
	"monster4",
	"monster5",
	"rcbandito",
	"scarab",
	"scarab2",
	"scarab3",
	"schlagen",
	"slamvan4",
	"slamvan5",
	"slamvan6",
	"toros",
	"tulip",
	"vamos",
	"zr380",
	"zr3802",
	"zr3803"
}

-- CODE --

Citizen.CreateThread(function()
	while true do
		Wait(1)

		playerPed = GetPlayerPed(-1)
		if playerPed then
			checkCar(GetVehiclePedIsIn(playerPed, false))

			x, y, z = table.unpack(GetEntityCoords(playerPed, true))
			for _, blacklistedCar in pairs(carblacklist) do
				checkCar(GetClosestVehicle(x, y, z, 100.0, GetHashKey(blacklistedCar), 70))
			end
		end
	end
end)

function checkCar(car)
	if car then
		carModel = GetEntityModel(car)
		carName = GetDisplayNameFromVehicleModel(carModel)

		if isCarBlacklisted(carModel) then
			_DeleteEntity(car)
			sendForbiddenMessage("This vehicle is blacklisted!")
		end
	end
end

function isCarBlacklisted(model)
	for _, blacklistedCar in pairs(carblacklist) do
		if model == GetHashKey(blacklistedCar) then
			return true
		end
	end

	return false
end
1 Like

thats the same with me, can someone help please?

can someone help with the blacklist of guns?

– Blacklisted weapons
weaponblacklist = {
“WEAPON_MINIGUN”,
“WEAPON_rpg”,
“WEAPON_pistol mk2”,
“WEAPON_Up-N-AUTOMIZER”,
“WEAPON_MG”,
“WEAPON_COMBAT mG mK2”,

How about props i would need them too bcz theres always modder who likes to put ramps everywhere?

is it possible to let admins spawn in the blacklisted vehicles?

I get this in my server. Whats the issue?1

Did you find a fix for this? @M4T4T0

The script needs to be optimized, the reason your getting that warning is because it’s unoptimized and therefor having a toll on your server performance.