605f9ca8fc
+ Added /delallnow to instantly delete vehicles without the wait. + Changed base command timer from 1 minute to 5 minutes.
16 lines
603 B
Lua
16 lines
603 B
Lua
RegisterCommand(Config.commandName, function(source, args, rawCommand) TriggerClientEvent("delall", -1) end, Config.restricCommand)
|
|
|
|
RegisterCommand(Config.commandNowName, function(source, args, rawCommand) TriggerClientEvent("delallnow", -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) |