For the complete documentation index, see llms.txt. This page is also available as Markdown.

Secure your server

Handle citizen files on your server

In order to protect your server from players who are playing with citizen files, the best solution is to use pure level 1. Use the following server command in your server.cfg file:
sv_pureLevel 1 # disable citizen files

Handle entity creation on your server

The anticheat resource is not the only resource responsible of spawning entities on the server from external sources. As the anticheat resource is a standalone resource, the anticheat resource does everything that is possible. It is important to design your server resources carefully in order to ensure security for your server. In order to protect your server, you can practice the following security measures.

In order to protect your server from spawning entities from external sources, the best solution is to use anticheat entity lockdown feature or make your own server side checks inside your server for entity creation based on your server scripts
It is recommended to create a backup of your server files before you make any change
For each type of entity, we propose to create entity creation checks on server side based on the following

Vehicles

  1. Whitelisted vehicle model (Example: Allow whitelisted vehicles spawn anywhere)

  2. Whitelisted areas (Example: Allow any vehicle spawn in whitelisted area)

  3. Check vehicle model (Example: If there is a vehicle model that is not used on your server, prevent the entity creation. For sure there are a lot of GTA 5 vehicle models that are not used on your server, so you can create a check if the vehicle is from GTA 5 and not a whitelisted GTA 5 vehicle model to prevent the vehicle creation)

  4. Check players coordinates (Example: Coordinates between player and garage. If the player is far away from the garage/job, prevent the vehicle creation)

  5. Check vehicle coordinates (Example: Coordinates between vehicle and garage. If the vehicle is far away from the garage/job, prevent the vehicle creation)

  6. Check vehicle ownership (Example: If the player tries to spawn a vehicle that does not own, prevent the vehicle creation)

  7. Whitelist players (Example: Staff members)

  8. Others based on your server functionality

Peds

  1. Whitelisted ped model (Example: Allow whitelisted ped spawn anywhere) -> already in the anticheat configuration

  2. Whitelisted areas (Example: Allow any ped spawn in whitelisted area)

  3. Check player coordinates (Example: Coordinates between player and ped spawn location. If the ped is far away from the player, prevent the ped creation)

  4. Prevent any ped creation if you don't have scripts that spawn peds (don't take in consideration the non-networked peds that spawn on player spawn from scripts similar to okokTalkToNPC)

  5. Others based on your server functionality

Objects

  1. Whitelisted ped model (Example: Allow whitelisted object spawn anywhere) -> already in the anticheat configuration

  2. Whitelisted areas (Example: Allow any object spawn in whitelisted area)

  3. Check player coordinates (Example: Coordinates between player and object spawn location. If the object is far away from the player, prevent the object creation)

  4. Others based on your server functionality

The content from above is just an example of a solution to create vehicles, peds and objects on server side.

Handle weapons on your server

In order to protect your server from spawning weapons from external sources there are two ways that can prevent such functions, more than anticheat resource can already do

Weapons from weapon wheel

Weapons from server inventory

Handle functions and events

If you use functions from server side to client side through tunnels, every function will generate an event in network event logger, so you can protect the generated event.

Last updated