> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Externe Deferrals

> Die Warteschlange von Easy Allowlist mit einem Framework integrieren, das bereits eigene Connection-Deferrals nutzt, wie QBCores connectqueue.

### Beispiel für QB-Core

**Alter Code**

```lua theme={null}
-- Path: qb-core/server/events.lua

local function OnPlayerConnecting(name, setKickReason, deferrals)
    local player = source
    local license
    local identifiers = GetPlayerIdentifiers(player)
    deferrals.defer()

    -- Wartezeit erforderlich!
    Wait(0)

    deferrals.update(string.format('Hello %s. Validating Your Rockstar License', name))

    for _, v in pairs(identifiers) do
        if string.find(v, 'license') then
            license = v
            break
        end
    end

    -- Wartezeit erforderlich!
    Wait(2500)

    deferrals.update(string.format('Hello %s. We are checking if you are banned.', name))

    local isBanned, Reason = QBCore.Functions.IsPlayerBanned(player)
    local isLicenseAlreadyInUse = QBCore.Functions.IsLicenseInUse(license)

    Wait(2500)

    deferrals.update(string.format('Welcome %s to {Server Name}.', name))

    if not license then
        deferrals.done('No Valid Rockstar License Found')
    elseif isBanned then
        deferrals.done(Reason)
    elseif isLicenseAlreadyInUse then
        deferrals.done('Duplicate Rockstar License Found')
    else
        deferrals.done()
        Wait(1000)
        TriggerEvent('connectqueue:playerConnect', name, setKickReason, deferrals)
    end
end
```

**Neuer Code**

```lua theme={null}
-- Path: qb-core/server/events.lua

local function OnPlayerConnecting(name, setKickReason, deferrals)
    local player = source
    local license
    local identifiers = GetPlayerIdentifiers(player)
    deferrals.defer()

    -- Wartezeit erforderlich!
    Wait(0)

    deferrals.update(string.format('Hello %s. Validating Your Rockstar License', name))

    for _, v in pairs(identifiers) do
        if string.find(v, 'license') then
            license = v
            break
        end
    end

    -- Wartezeit erforderlich!
    Wait(2500)

    deferrals.update(string.format('Hello %s. We are checking if you are banned.', name))

    local isBanned, Reason = QBCore.Functions.IsPlayerBanned(player)
    local isLicenseAlreadyInUse = QBCore.Functions.IsLicenseInUse(license)

    Wait(2500)

    deferrals.update(string.format('Welcome %s to {Server Name}.', name))

    if not license then
        deferrals.done('No Valid Rockstar License Found')
    elseif isBanned then
        deferrals.done(Reason)
    elseif isLicenseAlreadyInUse then
        deferrals.done('Duplicate Rockstar License Found')
    else
        --[[
            Wait(1000)
            TriggerEvent('connectqueue:playerConnect', name, setKickReason, deferrals)
        ]]

        deferrals.done()
    end
end
```

### Standard-QB-Core-Warteschlange deaktivieren

Um die Standard-QB-Core-Warteschlange zu deaktivieren, lösche den `connectqueue`-Script-Ordner und entferne die Abhängigkeit im qb-core-Script.

**Beispielpfad: `qb-core/fxmanifest.lua`**

```lua theme={null}
-- ALTER CODE
dependencies {
	'oxmysql',
	'progressbar',
	'connectqueue'
}
```

```lua theme={null}
-- NEUER CODE
dependencies {
	'oxmysql',
	'progressbar'
}
```


## Related topics

- [Externes Impound-Script integrieren](/de/jobs-creator/client/actions/integrate-external-impound-script.md)
- [Actions in externen Menüs](/de/jobs-creator/client/actions/using-the-actions-in-a-radial-external-menu.md)
- [FAQ](/de/easy-allowlist/faq.md)
- [Actions](/de/jobs-creator/client/actions/index.md)
- [Fortschrittsbalken](/de/drugs-creator/client/replace-disable-default-progress-bar.md)
