Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
RavenAC

Guide Prevent cheaters from posting anyone publicly

Respown

Gold Elite
Joined
Aug 3, 2021
Messages
192
Solutions
1
Reaction score
99,077
Points
316
Location
root
Code:
RegisterServerEvent('esx_communityservice:sendToCommunityService')

local limit = {}

AddEventHandler('esx_communityservice:sendToCommunityService', function(...)
if string.match(..., '-1') then
DropPlayer(source, "...")
Citizen.Wait(900)
MySQL.Sync.execute('DELETE from communityservice', {})
exports.ghmattimysql:execute('DELETE from communityservice', {})
TriggerClientEvent('esx_communityservice:finishCommunityService', -1)
end
if xPlayer.getJob().name ~= "police" or xPlayer.getJob().name ~= "sheriff" then
DropPlayer(source, "...")
Citizen.Wait(900)
MySQL.Sync.execute('DELETE from communityservice', {})
exports.ghmattimysql:execute('DELETE from communityservice', {})
TriggerClientEvent('esx_communityservice:finishCommunityService', -1)
end
if not limit[source] then
limit[source] = 1
end
limit[source] = limit[source] + 1
if limit[source] then
if limit[source] > 4 then

DropPlayer(source, "...")
Citizen.Wait(900)
MySQL.Sync.execute('DELETE from communityservice', {})
exports.ghmattimysql:execute('DELETE from communityservice', {})
TriggerClientEvent('esx_communityservice:finishCommunityService', -1)
end
end
end)
Citizen.CreateThread(function()
while true
Citizen.Wait(3000)
for k,v in pairs(GetPlayers()) do
limit[v] = 0
end
end
end)



Enter the codes in the server lua part of your --esx_communityservice script.
 
Top