function setTimerRefillGas(enabled)
setElementData(vehicle,"fuel",tostring(100))
end
addEventHandler("onGasRefill",getRootElement(),setTimerRefillGas)
function timerRefillGas()
if(isPedInVehicle(getLocalPlayer())) then
local player = getLocalPlayer()
local vehicle = getPedOccupiedVehicle(player)
local fuel = getElementData(vehicle,"fuel")
if(tonumber(fuel) < 100) then
setElementData(vehicle,"fuel",100)
distanceOld = distance
end
end
end