local Commands = {}
Commands.TurretSendAll = {}
Commands.TurretSendAll.SetUpANewAngle = function(args)
    local vehiclezb = getVehicleById(args.vehicleId)
    local NewAngle = args.Angle
    if vehiclezb then
        local TurretPart = vehiclezb:getPartById(args.TurretType)
        if TurretPart and TurretPart:getInventoryItem() then
            local modData = vehiclezb:getModData()
            modData.OldAngle = NewAngle
            TurretPart:setModelVisible(args.TurretType .. NewAngle, true)

        end
    end
end

Commands.TurretSendAll.SetNewAccess = function(args)
    local vehiclezb = getVehicleById(args.vehicleId)
    if not vehiclezb then
        return
    end
    local modData = vehiclezb:getModData()
    modData.User = args.User
end

local onServerCommand = function(module, command, args)
    if Commands[module] and Commands[module][command] then
        Commands[module][command](args)
    end
end
Events.OnServerCommand.Add(onServerCommand)
