This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.lua
31 lines (27 loc) · 2.05 KB
/
client.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
RegisterNetEvent("vanishdev:delallveh")
AddEventHandler("vanishdev:delallveh", function ()
TriggerEvent('chat:addMessage', {
template = '<div style="padding: 10px; margin: 10px; background-color: rgba(202, 45, 45, 1); border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); color: white; font-family: Arial, sans-serif; font-size: 20px; font-weight: bold; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);"><i class="fas fa-car-crash"></i> {0}:<br> {1}</div>',
args = { 'City Tow', 'A city car tow is coming in ' .. Config.timebeforecleanup .. ' minutes.' }
})
Citizen.Wait((Config.timebeforecleanup - 1) * 60 * 1000)
TriggerEvent('chat:addMessage', {
template = '<div style="padding: 10px; margin: 10px; background-color: rgba(202, 45, 45, 1); border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); color: white; font-family: Arial, sans-serif; font-size: 20px; font-weight: bold; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);"><i class="fas fa-car-crash"></i> {0}:<br> {1}</div>',
args = { 'City Tow', 'A city car tow is coming in 1 minute! If you don\'t want your car to disappear, stay in the vehicle!' }
})
Citizen.Wait(1 * 60 * 1000)
for vehicle in EnumerateVehicles() do
if (not IsPedAPlayer(GetPedInVehicleSeat(vehicle, -1))) then
SetVehicleHasBeenOwnedByPlayer(vehicle, false)
SetEntityAsMissionEntity(vehicle, false, false)
DeleteVehicle(vehicle)
if DoesEntityExist(vehicle) then
DeleteVehicle(vehicle)
end
end
end
TriggerEvent('chat:addMessage', {
template = '<div style="padding: 10px; margin: 10px; background-color: rgba(202, 45, 45, 1); border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); color: white; font-family: Arial, sans-serif; font-size: 20px; font-weight: bold; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);"><i class="fas fa-car-crash"></i> {0}:<br> {1}</div>',
args = { 'City Tow', 'The city tow has been completed.' }
})
end)