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 filesHandle entity creation on your server
In order to protect your server from spawning entities from external sources, it is recommended to shift the entity spawn from client side to server side directly from your server resources by creating a server side function in your framework that spawns the entity and use it instead the client side natives or directly use server side native for spawning entities and add to your server.cfg one of the lines below at your choicesv_entityLockdown relaxed #Blocks only client-created entities that are not owned by scripts.
sv_entityLockdown strict #Prevents clients from creating any entities.It is recommended to make tests before launching this shift.Client sidelocal vehicle = CreateVehicle(GetHashKey("adder"), coords[1], coords[2], coords[3], 200.0, true, false)
TaskWarpPedIntoVehicle(PlayerPedId(), vehicle, -1)Server sidefunction tvRP.CreateVehicle(hash, x, y, z, heading, isNetwork, netMissionEntity)
local source = source
local user_id = vRP.getUserId(source)
if source and user_id then
local vehicle = CreateVehicle(hash, x, y, z, heading, isNetwork, netMissionEntity)
Wait(100)
if DoesEntityExist(vehicle) then
SetPedIntoVehicle(GetPlayerPed(source), vehicle, -1)
return NetworkGetNetworkIdFromEntity(vehicle)
end
end
return nil
endHandle weapons on your server
Handle functions and events
Last updated