[Question] Anti Cheat

I need link anti spawning spam entity, anti Lua injection. Please help me…Thanks

As for “spawning spam entity”, as I am assuming you are referring to spawning vehicles at a high pace, it depends on if you are an economy server or not as to how I believe you would wish to prevent this, furthermore how i interpret your concern regarding that.

For economy:

Usually if you have scripthook set to 0 in your config, you shouldn’t be able to spawn vehicles of any sort.

But i recommend you use this

For Menu based server:

If you are like most normal menu based servers, you will be using vMenu, there should of been a file that came with vMenu in the “config(s)” folder, where there was a permissions.cfg file that you were instructed to place in the same directory your server.cfg file along with adding this to your server.cfg: ‘exec permissions.cfg’.

in there, there should be an option to disallow the ability for users to spawn a bunch of vehicles on top of eachother, i think it is something like ‘dontdeletepreviousvehicle’ or’ ‘spawnontopofothervehicle’, etc…
just place a # at the start of that line, and also if vMenu.VehicleSpawner.All is ‘allowed’, make sure to # that out too.

As for Lua injection, oh boy…

I recommend you use this script:

[Release][DEV] Server Event Security Tokens - Anticheat

but it can be a little bit overwhelming to set up at first, but rest assured, as I am quite confident that FiveM’s Anticheat already detects most methods of ‘injection’ or ‘memory manipulation’ methods most Lua injectors use. (i know this because i have written an Ant Cheat before, hope this doesn’t get anyone on my back :skull: )

Lua injectors usually inject some code that manipulates or utalies FiveM’s internel CitizenFXCreate thread function, to call in game LUA functions client side, by triggering these said events, it results in players being able to trigger events for god mode, spawning vehicles etc…) but the AntiCheat prevents any threads from being opened that aren’t signed (unlike drivers, etc… :o ) being injected into FiveM’s process.

So I say you are safe to go :slight_smile:

1 Like

Sorry for bumping this, but what about a menu that is stopping resources? I mean, you can handle injection and cheats somehow, but how can you handle a cheat (menu) such as an injection that is requesting a script to stop running? With this way, if someone stops a specific resource that not supposed to, it can even crash the whole server.

You can request a callback to the resource, and if it doesn’t return, then you know it’s stopped.