mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 09:18:56 +00:00
Adds function for vehicle extra PRs
This adds the function for both qb-policejob and qb-ambulancejob VehicleExtra PRs https://github.com/qbcore-framework/qb-ambulancejob/pull/102 https://github.com/qbcore-framework/qb-ambulancejob/pull/103 https://github.com/qbcore-framework/qb-policejob/pull/199 https://github.com/qbcore-framework/qb-policejob/pull/200
This commit is contained in:
+12
@@ -41,6 +41,18 @@ QBShared.Round = function(value, numDecimalPlaces)
|
||||
return math.floor((value * power) + 0.5) / (power)
|
||||
end
|
||||
|
||||
QBShared.SetDefaultVehicleExtras = function (vehicle, config)
|
||||
-- Clear Extras
|
||||
for i=1,20 do
|
||||
if DoesExtraExist(vehicle, i) then
|
||||
SetVehicleExtra(vehicle, i, 1)
|
||||
end
|
||||
end
|
||||
|
||||
for id, enabled in pairs(config) do
|
||||
QBShared.ChangeVehicleExtra(vehicle, tonumber(id), true)
|
||||
end
|
||||
end
|
||||
|
||||
QBShared.StarterItems = {
|
||||
['phone'] = { amount = 1, item = 'phone' },
|
||||
|
||||
Reference in New Issue
Block a user