Skip to content

Commit

Permalink
fix(client): clear ped tasks after progress circle
Browse files Browse the repository at this point in the history
A ~recent change to ox_lib changed behaviour here.
  • Loading branch information
thelindat committed Mar 26, 2023
1 parent fcdbe24 commit 3116286
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ local function startFueling(vehicle, isPump)
Wait(Config.refillTick)
end

ClearPedTasks(cache.ped)

if isPump then
TriggerServerEvent('ox_fuel:pay', price, fuel, NetworkGetNetworkIdFromEntity(vehicle))
else
Expand All @@ -274,7 +276,7 @@ local function startFueling(vehicle, isPump)
end

local function getPetrolCan(pumpCoord, refuel)
TaskTurnPedToFaceCoord(cache.ped, pumpCoord, Config.petrolCan.duration)
TaskTurnPedToFaceCoord(cache.ped, pumpCoord.x, pumpCoord.y, pumpCoord.z, Config.petrolCan.duration)
Wait(500)

if lib.progressCircle({
Expand All @@ -298,6 +300,8 @@ local function getPetrolCan(pumpCoord, refuel)

TriggerServerEvent('ox_fuel:fuelCan', false, Config.petrolCan.price)
end

ClearPedTasks(cache.ped)
end

if not Config.qtarget then
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ game 'gta5'
--[[ Resource Information ]]--
name 'ox_fuel'
author 'Overextended'
version '1.2.0'
version '1.2.1'
repository 'https://github.com/overextended/ox_fuel'
description 'Fuel management system with ox_inventory support'

Expand Down

0 comments on commit 3116286

Please sign in to comment.