Jump to content

[Help] CVehicleFuelsystem


SjoerdPSV

Recommended Posts

Hello,

I'm using a fuel system script, but there's a bug which I can't get fixed. It should stop refilling my car when I leave the marker but it doesn't work.

This is the server side, if I leave the marker, it should stop refilling my car but it doesn't work.

function onEnterRefillArea(thePlayer,amount,player,sDimension) 
    triggerClientEvent("onGasRefill",getRootElement(),true) 
    takePlayerMoney(thePlayer,500) 
    exports["TopBarChat"]:sendClientMessage("Your vehicle has been refilled for $500!",thePlayer,12,163,19,true,8) 
end 
addEventHandler("onMarkerHit",getRootElement(),onEnterRefillArea) 
  
  
function onExitRefillArea(player,sDimension) 
        triggerClientEvent("onGasRefill",getRootElement(),false) 
end 
addEventHandler("onMarkerLeave",getRootElement(),onExitRefillArea) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...