20 lines
997 B
Lua
20 lines
997 B
Lua
require "KLT_LAV"
|
|
local L = KLTLAV
|
|
Events.OnClientCommand.Add(function(module, command, player, args)
|
|
if module ~= "turret_sync" or command ~= "syncAnim" or not args then return end
|
|
if type(args.vehicleID) ~= "number" or type(args.animID) ~= "string" then return end
|
|
local value = tonumber(args.animID)
|
|
if not value or value % 2 ~= 0 or value < 2 or value > 360 then return end
|
|
local vehicle = getVehicleById(args.vehicleID)
|
|
if L.isGunner(vehicle, player) then L.savePose(vehicle, string.format("%03d", value)) end
|
|
end)
|
|
require "Items/ProceduralDistributions"
|
|
local supplies = ProceduralDistributions.list.ArmyStorageAmmunition
|
|
if supplies and supplies.items then
|
|
for _, ammoType in ipairs({L.ammoType, L.heAmmoType}) do
|
|
local present = false
|
|
for i = 1, #supplies.items, 2 do if supplies.items[i] == ammoType then present = true end end
|
|
if not present then table.insert(supplies.items, ammoType); table.insert(supplies.items, 3) end
|
|
end
|
|
end
|