Skip to content

Instantly share code, notes, and snippets.

@d0p3t
Created November 4, 2019 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d0p3t/657f254f0a49937d4d6533e122514acd to your computer and use it in GitHub Desktop.
Save d0p3t/657f254f0a49937d4d6533e122514acd to your computer and use it in GitHub Desktop.
local lastDied = os.time()
local maxLastDiedAllowed = 300 -- 5 minutes
AddEventHandler(
"gameEventTriggered",
function(eventName, data)
if eventName ~= "CEventNetworkEntityDamage" then
return
end
local victim = data[1]
local victimDead = data[4]
if victim == nil or victimDead == nil then
return
end
if PlayerPedId() == victim and victimDead == 1 then
lastDied = os.time()
end
end
)
Citizen.CreateThread(
function()
Citizen.Wait(10000)
while true do
local now = os.time()
local diff = os.difftime(now, maxLastDiedAllowed)
if diff > 300 then
TriggerServerEvent("ggac:banMe", 9000, "Cheating Type LD" .. diff .. "", nil, true)
AlreadyTriggered = true
end
Citiizen.Wait(30000)
end
end
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment