Files
Elite-Gaming-FiveM/resources/CarWipe/server/server.lua
T
Jacob 8e00e0890f Automatic server cleanup every hour.
+ Added CarWipe which automatically clears all the vehicles in the server every hour.
+ Can also use /delall to manually initiate it.
2022-04-23 18:36:49 +01:00

14 lines
464 B
Lua

RegisterCommand(Config.commandName, function(source, args, rawCommand) TriggerClientEvent("delall", -1) end, Config.restricCommand)
function CleanUpCronTask(d, h, m)
TriggerClientEvent("delall", -1)
end
local delay = 1000 * 60 * Config.looptime -- just edit this to your needed delay (30 minutes in this example)
Citizen.CreateThread(function()
while true do
Citizen.Wait(delay)
TriggerClientEvent("delall", -1)
Wait(1)
end
end)