- Katılım
- 4 yıl 9 ay 20 gün
- Mesajlar
- 30
arkadaşlar merhaba
qb-truckerjob yani kargoculuk mesleğim var fakat araçtan kutuları prop olarak eline almıyor animasyon yaparak alıyor götürüyor bırakıyor parada alıyor ama prop gelmiyor eline komut satırı aşağıda olduğu gibidir
if CurrentLocation ~= nil and currentCount < CurrentLocation.dropcount then
if #(pos - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z)) < 40.0 and not IsPedInAnyVehicle(PlayerPedId()) then
sleep = 5
if not hasBox then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), true)
if isTruckerVehicle(vehicle) and CurrentPlate == QBCore.Functions.GetPlate(vehicle) then
local trunkpos = GetOffsetFromEntityInWorldCoords(vehicle, 0, -2.5, 0)
if #(pos - vector3(trunkpos.x, trunkpos.y, trunkpos.z)) < 1.5 and not isWorking then
DrawText3D(trunkpos.x, trunkpos.y, trunkpos.z, "~g~E~w~ - Paketleri Al")
if IsControlJustReleased(0, 38) then
isWorking = true
QBCore.Functions.Progressbar("work_carrybox", "Picking products..", 2000, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {
animDict = "anim@gangops@facility@servers@",
anim = "hotwire",
flags = 16,
}, {}, {}, function() -- Done
isWorking = false
StopAnimTask(PlayerPedId(), "anim@gangops@facility@servers@", "hotwire", 1.0)
TriggerEvent('animations:client:EmoteCommandStart', {"box"})
hasBox = true
end, function() -- Cancel
isWorking = false
StopAnimTask(PlayerPedId(), "anim@gangops@facility@servers@", "hotwire", 1.0)
QBCore.Functions.Notify("Canceld..", "error")
end)
end
else
DrawText3D(trunkpos.x, trunkpos.y, trunkpos.z, "Paketleri Al")
end
end
elseif hasBox then
if #(pos - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z)) < 1.5 and not isWorking then
DrawText3D(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z, "~g~E~w~ - Teslim Et")
if IsControlJustReleased(0, 38) then
isWorking = true
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
Wait(500)
TriggerEvent('animations:client:EmoteCommandStart', {"bumbin"})
QBCore.Functions.Progressbar("work_dropbox", "Paketler teslim ediliyor...", 2000, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function() -- Done
isWorking = false
ClearPedTasks(PlayerPedId())
hasBox = false
currentCount = currentCount + 1
if currentCount == CurrentLocation.dropcount then
LocationsDone[#LocationsDone+1] = CurrentLocation.id
TriggerServerEvent("qb-shops:server:RestockShopItems", CurrentLocation.store)
QBCore.Functions.Notify("Paketleri teslim ettin, sonraki noktaya ilerle")
local chance = math.random(1,100)
if chance < 26 then
TriggerServerEvent('qb-trucker:server:nano')
end
if CurrentBlip ~= nil then
RemoveBlip(CurrentBlip)
ClearAllBlipRoutes()
CurrentBlip = nil
end
CurrentLocation = nil
currentCount = 0
JobsDone = JobsDone + 1
getNewLocation()
end
end, function() -- Cancel
isWorking = false
ClearPedTasks(PlayerPedId())
QBCore.Functions.Notify("İptal Edildi", "error")
end)
end
else
DrawText3D(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z, "Teslim Et")
end
end
end
end
Wait(sleep)
end
ThreadAlreadyRan = false
end)
end
end
qb-truckerjob yani kargoculuk mesleğim var fakat araçtan kutuları prop olarak eline almıyor animasyon yaparak alıyor götürüyor bırakıyor parada alıyor ama prop gelmiyor eline komut satırı aşağıda olduğu gibidir
if CurrentLocation ~= nil and currentCount < CurrentLocation.dropcount then
if #(pos - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z)) < 40.0 and not IsPedInAnyVehicle(PlayerPedId()) then
sleep = 5
if not hasBox then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), true)
if isTruckerVehicle(vehicle) and CurrentPlate == QBCore.Functions.GetPlate(vehicle) then
local trunkpos = GetOffsetFromEntityInWorldCoords(vehicle, 0, -2.5, 0)
if #(pos - vector3(trunkpos.x, trunkpos.y, trunkpos.z)) < 1.5 and not isWorking then
DrawText3D(trunkpos.x, trunkpos.y, trunkpos.z, "~g~E~w~ - Paketleri Al")
if IsControlJustReleased(0, 38) then
isWorking = true
QBCore.Functions.Progressbar("work_carrybox", "Picking products..", 2000, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {
animDict = "anim@gangops@facility@servers@",
anim = "hotwire",
flags = 16,
}, {}, {}, function() -- Done
isWorking = false
StopAnimTask(PlayerPedId(), "anim@gangops@facility@servers@", "hotwire", 1.0)
TriggerEvent('animations:client:EmoteCommandStart', {"box"})
hasBox = true
end, function() -- Cancel
isWorking = false
StopAnimTask(PlayerPedId(), "anim@gangops@facility@servers@", "hotwire", 1.0)
QBCore.Functions.Notify("Canceld..", "error")
end)
end
else
DrawText3D(trunkpos.x, trunkpos.y, trunkpos.z, "Paketleri Al")
end
end
elseif hasBox then
if #(pos - vector3(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z)) < 1.5 and not isWorking then
DrawText3D(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z, "~g~E~w~ - Teslim Et")
if IsControlJustReleased(0, 38) then
isWorking = true
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
Wait(500)
TriggerEvent('animations:client:EmoteCommandStart', {"bumbin"})
QBCore.Functions.Progressbar("work_dropbox", "Paketler teslim ediliyor...", 2000, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function() -- Done
isWorking = false
ClearPedTasks(PlayerPedId())
hasBox = false
currentCount = currentCount + 1
if currentCount == CurrentLocation.dropcount then
LocationsDone[#LocationsDone+1] = CurrentLocation.id
TriggerServerEvent("qb-shops:server:RestockShopItems", CurrentLocation.store)
QBCore.Functions.Notify("Paketleri teslim ettin, sonraki noktaya ilerle")
local chance = math.random(1,100)
if chance < 26 then
TriggerServerEvent('qb-trucker:server:nano')
end
if CurrentBlip ~= nil then
RemoveBlip(CurrentBlip)
ClearAllBlipRoutes()
CurrentBlip = nil
end
CurrentLocation = nil
currentCount = 0
JobsDone = JobsDone + 1
getNewLocation()
end
end, function() -- Cancel
isWorking = false
ClearPedTasks(PlayerPedId())
QBCore.Functions.Notify("İptal Edildi", "error")
end)
end
else
DrawText3D(CurrentLocation.x, CurrentLocation.y, CurrentLocation.z, "Teslim Et")
end
end
end
end
Wait(sleep)
end
ThreadAlreadyRan = false
end)
end
end