the script to pick up the vehicle and teleport until it worked, but the problem is that when I get out of the vehicle the vehicle disappears instantly, I want it to disappear in 5 minutes, see what I'm doing wrong
function leavevehicle(player)
if veh1[player] and isElement(veh1[player]) then
t = setTimer ( leavevehicle, 5000, 1, destroyElement(veh1[player])) -- I put 5 seconds to see the fastest results, but still it disappears instantly
end
end
addEventHandler("onVehicleExit", getRootElement(), leavevehicle)function entervehicle(player)
killTimer (t)
end
addEventHandler("onVehicleEnter", getRootElement(),entervehicle)