function respawnTheVehicle(vehicle)
setElementCollisionsEnabled(vehicle, true)
respawnVehicle(vehicle)
end
function aracResle(thePlayer, seat,jacked)
if (exports.integration:isPlayerTrialAdmin(thePlayer)) then
local vehicles = exports.pool:getPoolElementsByType("vehicle")
local counter = 0
local theVehicle = getPedOccupiedVehicle(thePlayer)
local dbid = getElementData(theVehicle, "dbid")
if dbid and dbid > 0 then
if getElementData(theVehicle, "owner") == 1 or getElementData(theVehicle, "owner") > 1 then
local driver = getVehicleOccupant(theVehicle)
local pass1 = getVehicleOccupant(theVehicle, 1)
local pass2 = getVehicleOccupant(theVehicle, 2)
local pass3 = getVehicleOccupant(theVehicle, 3)
if not pass1 and not pass2 and not pass3 and not driver and not getVehicleTowingVehicle(theVehicle) and #getAttachedElements(theVehicle) == 0 then
if isElementAttached(theVehicle) then
detachElements(theVehicle)
end
setTimer(function()
exports.anticheat:changeProtectedElementDataEx(theVehicle, 'i:left')
exports.anticheat:changeProtectedElementDataEx(theVehicle, 'i:right')
respawnTheVehicle(theVehicle)
setVehicleLocked(theVehicle, false)
setElementInterior(theVehicle, getElementData(theVehicle, "interior"))
setElementDimension(theVehicle, getElementData(theVehicle, "dimension"))
exports.anticheat:changeProtectedElementDataEx(theVehicle, "vehicle:radio", 0, true)
counter = counter + 1
end,120000,1,thePlayer)
end
end
end
end
end
addEventHandler("onVehicleStartExit",root,aracResle)