This is what I am working with right now.
Citizen.CreateThread( function()
while true do
Wait(0)
if IsPedJacking(GetPlayerPed(-1)) then
Wait(3000)
if math.random > 0.8 then
SetVehicleDoorsLocked(vehicle, 2)
elseif math.random < 0.2 then
SetVehicleDoorsLocked(vehicle, 1)
end
end)
end)
Just trying to put like a 20% chance for AI cars to be unlocked, but it isn’t seeming to work correctly. Still leaves all vehicles locked.