mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-16 21:46:03 +01:00
update: lock traffic vehicles
This commit is contained in:
@@ -340,3 +340,10 @@ else
|
||||
NDCore.giveVehicleKeys(veh, src, target)
|
||||
end, false)
|
||||
end
|
||||
RegisterNetEvent("entityCreated", function(entity)
|
||||
if GetEntityType(entity) ~= 2 then return end
|
||||
local state = Entity(entity).state
|
||||
if state.owner or math.random(1, 100) <= Config.randomUnlockedVehicleChance then return end
|
||||
if state.locked ~= nil then return end
|
||||
state.locked = true
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user