Page cover

πŸ”SAFE EVENTS

Introducing a game-changing script designed for FiveM server owners who prioritize security. Tested and proven on servers with over 500 players.

1. CLIENT SIDE

EVENTS WITHOUT ARGUMENTS

You need to change the TriggerServerEvent of the events you want to secure, like the example below.

Before:

TriggerServerEvent('youreventname')

After:

exports["s_safeevents"]:ExecuteServerEvent('youreventname')

EVENTS WITH ARGUMENTS

You need to change the TriggerServerEvent of the events you want to secure, like the example below.

Before:

TriggerServerEvent('youreventname', aditionalarg)

After:

exports["s_safeevents"]:ExecuteServerEvent('youreventname', aditionalarg)

2. SERVER SIDE

Paste this on top of your server event:

local anticheat = {
        event = 'youreventname',
        mintime = 15, 
        checkdimension = true,
        checkcoords = vec3(1109.93, -2008.3, 31.06), -- OR FALSE
        maxdist = 80
   }
if not exports["s_safevents"]:VerifyToken(source, anticheat) then return end
  • mintime (how often player can trigger the event)

  • checkdimension (almost always true, only set to false if you are triggering a event that the player can be in a diferent dimension)

  • checkcoords (coords where the player should be)

  • maxdist (maximum distance that player can be from the coords above)

Example:

Last updated

Was this helpful?