How To Create an Anti-Cheat - List of Vulnerable and Abused Events (Updated January 2020)

Those are called natives, not events.

For some of them you can intercept them server side. For example the events giveWeaponEvent which is emitted when a player gives another player a weapon or explosionEvent for explosions.

They all have two parameters sender (self explanatory) and ev which is a JSON object with information about it.

See fivem/ServerGameState.cpp at 6f13235d01999779aa4220eede0abadaa49a6549 · citizenfx/fivem · GitHub

1 Like

Alright thanks, is there an example script on how to stop them? Also do you have any idea on how a modder was able to spawn LSIA on top of sandy shores today?

hi
please dm me

Don’t think about yourself, think about the community. Participate in the community by participating in this topic and discussion :slight_smile:

1 Like

it could be a good thing if you can not let players connect to your server IF they using any program in Windows, like these executors, exeption steam , fivem , gc, etc…

We as FiveM users cannot do that.

Why just don’t do access control on event ?
example :
triggerEvent → call server → check role right → return to event

1 Like

Yes that’s how people should always do it! ALWAYS CHECK PERMISSIONS ON YOUR EVENTS. Especially if it’s really exploitable events.

The events listed here are the known exploitable events without any protection. I don’t use any of them, and a lot of people don’t either so you can outright catch cheaters trying to invoke the event. They won’t invoke it unless they cheat as you don’t even use them.

This is also a list of events for people to realize how insanely insecure their server is if they use any of these public events.

3 Likes

Hello
can help me to make anti spam event for server ?

how do i get the password for the server
plz

That’s not related to an anticheat. Please use the search bar. I’m pretty sure there’s a resource that exists for it

The Best

Any way to detect in serverside the APPLY_FORCE_TO_ENTITY? A lot of cheats is using that to make things fly or moving so fast and hit others. I found way to prevent this somehow, but this require to do it for each client separately, is there anyway that we can get it directly?

What about GiveWeaponToPed() ? Giving specific weapons to their selfs… Is it any possible way to patch this?

If you’re using OneSync you can use the server convar sv_entityLockdown to prevent all clients from spawning entities. Fortunately or unfortunately that means you’ll need to create all entities on the server using RPC natives which can be found here. You can also use the experiemental CreateAutomobile native an example of which can be found in the FiveM discord

Wrong Lol Entity Lockdown Solves spawning in weapons same with vehicles.

Good code :slight_smile:

How to make a key system where people who purchase a key can redeem it.

what?

I think I want to start making my own Anti-Cheat soon. Is there anyone who would like to help with this? I have another developer who wants to help and is really good with lua scripts writing. You don’t have to worry about any costs, I will take care of them. I only need another developer who wants to help. There are 3 of us in total. If you are interested you can let me know :slight_smile: