mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Fix vehicle delivery
Mecanos must be in VehicleDelivery to complete NPCJobMission ! No more glitches
This commit is contained in:
+21
-5
@@ -27,6 +27,7 @@ local NPCTargetTowableZone = nil
|
||||
local NPCHasSpawnedTowable = false
|
||||
local NPCLastCancel = GetGameTimer() - 5 * 60000
|
||||
local NPCHasBeenNextToTowable = false
|
||||
local NPCTargetDeleterZone = false
|
||||
|
||||
ESX = nil
|
||||
GUI.Time = 0
|
||||
@@ -567,13 +568,20 @@ function OpenMobileMecanoActionsMenu()
|
||||
|
||||
if NPCOnJob then
|
||||
|
||||
if CurrentlyTowedVehicle == NPCTargetTowable then
|
||||
ESX.Game.DeleteVehicle(NPCTargetTowable)
|
||||
TriggerServerEvent('esx_mecanojob:onNPCJobMissionCompleted')
|
||||
StopNPCJob()
|
||||
if NPCTargetDeleterZone then
|
||||
|
||||
if CurrentlyTowedVehicle == NPCTargetTowable then
|
||||
ESX.Game.DeleteVehicle(NPCTargetTowable)
|
||||
TriggerServerEvent('esx_mecanojob:onNPCJobMissionCompleted')
|
||||
StopNPCJob()
|
||||
NPCTargetDeleterZone = false
|
||||
|
||||
else
|
||||
ESX.ShowNotification(_U('not_right_veh'))
|
||||
end
|
||||
|
||||
else
|
||||
ESX.ShowNotification(_U('not_right_veh'))
|
||||
ESX.ShowNotification(_U('not_right_place'))
|
||||
end
|
||||
|
||||
end
|
||||
@@ -886,6 +894,10 @@ AddEventHandler('esx_mecanojob:hasEnteredMarker', function(zone)
|
||||
|
||||
end
|
||||
|
||||
if zone =='VehicleDelivery' then
|
||||
NPCTargetDeleterZone = true
|
||||
end
|
||||
|
||||
if zone == 'MecanoActions' then
|
||||
CurrentAction = 'mecano_actions_menu'
|
||||
CurrentActionMsg = _U('open_actions')
|
||||
@@ -922,6 +934,10 @@ end)
|
||||
|
||||
AddEventHandler('esx_mecanojob:hasExitedMarker', function(zone)
|
||||
|
||||
if zone =='VehicleDelivery' then
|
||||
NPCTargetDeleterZone = false
|
||||
end
|
||||
|
||||
if zone == 'Craft' then
|
||||
TriggerServerEvent('esx_mecanojob:stopCraft')
|
||||
TriggerServerEvent('esx_mecanojob:stopCraft2')
|
||||
|
||||
@@ -62,6 +62,7 @@ Locales['fr'] = {
|
||||
['please_tow'] = 'veuillez ~y~remorquer~s~ le véhicule',
|
||||
['wait_five'] = 'Vous devez ~r~attendre~s~ 5 minutes',
|
||||
['must_in_flatbed'] = 'Vous devez être en flatbed pour commencer la mission',
|
||||
['not_right_place'] = 'Vous devez être au bon endroit pour faire cela',
|
||||
['mechanic_customer'] = 'client mecano',
|
||||
['you_do_not_room'] = '~r~Vous n\'avez plus de place',
|
||||
['recovery_gas_can'] = 'Récupération de ~b~bouteille de gaz~s~...',
|
||||
|
||||
Reference in New Issue
Block a user