Merge pull request #383 from Holidayy95/patch-2

Adds function for vehicle extra PRs
This commit is contained in:
Kakarot
2021-12-20 10:29:16 -06:00
committed by GitHub
+12
View File
@@ -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' },