8e00e0890f
+ Added CarWipe which automatically clears all the vehicles in the server every hour. + Can also use /delall to manually initiate it.
14 lines
464 B
Lua
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) |