- So now I’m trying to integrate Ped interaction for evidence in policejob this is what I’ve come up with so far but throws an error
for k, v in pairs(Config.Locations["evidence"]) do
QBCore.Functions.LoadModel('csb_prolsec')
while not HasModelLoaded('csb_prolsec') do
Wait(100)
end
evidencePed = CreatePed(0, 'csb_prolsec', v.evidence.x, v.evidence.y, v.evidence.z-1.0, v.evidence.w, false, true)
TaskStartScenarioInPlace(evidencePed, true)
FreezeEntityPosition(evidencePed, true)
SetEntityInvincible(evidencePed, true)
SetBlockingOfNonTemporaryEvents(evidencePed, true)
TaskStartScenarioInPlace(evidencePed, "WORLD_HUMAN_CLIPBOARD", 0, true)
exports['qb-target']:AddBoxZone("PoliceEvidence_"..k, vector4(v.evidence.x, v.evidence.y, v.evidence.z, v.evidence.w), 1, 1, {
name = "PoliceEvidence_"..k,
heading = 11,
debugPoly = false,
minZ = v.evidence.z - 1,
maxZ = v.evidence.z + 1,
}, {
options = {
{
type = "client",
action = function()
local data = {}
data.currentEvidence = 1
TriggerEvent('police:client:EvidenceStashDrawer', data)
end,
icon = "fas fa-folder-open",
label = "Submit Evidence",
job = "police",
},
},
distance = 3.0
})
end
end)
Also commented out this part as from what I can tell I don’t need it https://i.imgur.com/hdtgarq.png
Anyone have ideas/has attempted this before?
system
Closed
2
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.