undefined Posted August 28, 2014 Share Posted August 28, 2014 Hi guys. Im working on the my fuel system. But i have a problem. If the seat is 0, it still does not make the code. if seat == 0 then text = myFuelText[1] addEventHandler("onClientRender", root, pressBDx) bindKey("b", "down", triggerRefillFuel) end myFuelText = { [1] = "Press B to begin filled fuel", [2] = "Press B to stop filled fuel", [3] = "Tank was filled. Proceed!" } local marker = createMarker(692, 2569, 29, "cylinder", 3.0, 150, 150, 0, 150) addEventHandler( "onClientMarkerHit", marker, markerHit) function markerHit( hitElement, matchingDimension, seat ) local vehicle = getPedOccupiedVehicle(localPlayer) if hitElement == localPlayer then if vehicle then if seat == 0 then text = myFuelText[1] addEventHandler("onClientRender", root, pressBDx) bindKey("b", "down", triggerRefillFuel) end else text = myFuelText[1] addEventHandler("onClientRender", root, pressBDx) bindKey("b", "down", triggerRefillFuel) end end end It's not give warning or error. Thx Link to comment
lcd12321 Posted August 28, 2014 Share Posted August 28, 2014 because onClientMarkerHit doesn't send seat Link to comment
xXMADEXx Posted August 28, 2014 Share Posted August 28, 2014 Because seat isn't defnied to the vehicle seat. You can use getVehicleOccupants or getVehicleOccupant. Link to comment
undefined Posted August 28, 2014 Author Share Posted August 28, 2014 Because seat isn't defnied to the vehicle seat. You can use getVehicleOccupants or getVehicleOccupant. Thank you xXMADEXx. It's solved..! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now