when I enter to the vehicle as the driver, fuel changes to random,how to do that the fuel level will be loaded from a file?
function vehicleEnter(player, seat, jacked)
if(getElementData(vehicle, "fuel") == false) then
if seat == 0 then
fuel = math.random(70, 100)
setElementData(source, "fuel", tonumber(fuel))
end
end
if(getLocalPlayer()==player) then
guiSetVisible(fBar, true)
guiSetVisible(fLabel, true)
end
end
addEventHandler("onClientVehicleEnter", getRootElement(), vehicleEnter)