[Standalone] Blacklists

Hello there, one person asked me for a vehicle blacklisting system because they couldn’t find anything for their needs online, i saw all kinds of things with many complicated features but nothing simple so i made one myself and i’m sharing this for everyone to freely use it.

Since just a vehicle blacklist was maybe a little too simple for this release section i integrated vehicles, peds, objects and pickups, it’s still very simple but some of you may find it useful for your needs.

What it does

It simply checks periodically for all vehicles, peds, props and pickups and deletes the blacklist ones to avoid the game or players spawning unwanted things. Since it’s quite a heavy consuming resource i recomend setting the timer not too low, there is no need.

Download

Hope it was useful to you.

1 Like

That’s not really simple and also not secure at all. Doing it clientside is a terrible idea. Just use the entityCreating event server side and block props, vehicles, models of all kind in 1 simple list.

local BlacklistedModels = {
    [`vigilante`] = true,
    [`hydra`] = true,
    [`buzzard`] = true,
    [`deluxo`] = true,
    [`prop_cs_burger_01`] = true
}

AddEventHandler('entityCreating', function(entity)
    if BlacklistedModels[GetEntityModel(entity)] then
        CancelEvent()
    end
end)

Just chuck that on serverside, done.

2 Likes

yes, i know, i did not make it with big scaling in mind, also thanks i wasn’t aware of such event