# NoLimits LifeStyle Installation Guide

## Step 1 : Downloading the Script <a href="#install-dependencies" id="install-dependencies"></a>

{% hint style="success" %}
First, purchase the **NoLimits LifeStyle** from the [NoLimits Store](https://no-limits.tebex.io/). Once purchased, you'll find the download available in your [<mark style="color:red;">**Keymaster Account**</mark>](https://keymaster.fivem.net/).
{% endhint %}

{% hint style="danger" %}
️**Important:** Be sure to buy the script using the same [<mark style="color:red;">Keymaster account</mark>](https://keymaster.fivem.net/) that is linked to your server. Otherwise, you may encounter an error stating:\
\&#xNAN;**"You lack the required entitlement."**
{% endhint %}

***

## Step 2 : Resource Transfer

{% hint style="success" %}
After downloading the script, extract the ZIP file and upload the folder to your server’s `resources` directory.
{% endhint %}

If you are using **FTP**, please ensure you use [**WinSCP** ](https://winscp.net/eng/download.php)to transfer the resource to the server. If you use FileZilla, you may encounter the error "**Failed to verify protected resource**"\
Resource Dependency\\

***

## Step 3: Starting the Resource

Add the script to your `server.cfg`, making sure it's started in the correct order. Here's an example layout:

```
ensure es_extended/qb-core   # Core framework must start before this

# Start NOLIMITS LIFESTYLE SCRIPT 
ensure nl-LifeStyle

# Other server resources follow

```

***

## Step 4: install guide for <mark style="color:blue;">illenium-appearance</mark>

1\. Open this file

<pre><code><strong>illenium-appearance/client/client.lua
</strong></code></pre>

2. Scroll to around **Line 120/110** to find the following function:

```
function InitializeCharacter(gender, onSubmit, onCancel)
```

3. Replace the Function:\
   \
   Replace the entire block of the `InitializeCharacter` function with the updated version provided below.
4. Update code

```
function InitializeCharacter(gender, onSubmit, onCancel)
    SetInitialClothes(Config.InitialPlayerClothes[gender])
    local config = getNewCharacterConfig()
    TriggerServerEvent("illenium-appearance:server:ChangeRoutingBucket")

    client.startPlayerCustomization(function(appearance)
        if appearance then
            TriggerServerEvent("illenium-appearance:server:saveAppearance", appearance)

            -- ✅ Properly trigger your lifestyle UI
            Wait(500)
            TriggerEvent('my-lifestyle:openUI')

            if onSubmit then
                onSubmit()
            end
        elseif onCancel then
            onCancel()
        end

        Framework.CachePed()
        TriggerServerEvent("illenium-appearance:server:ResetRoutingBucket")
    end, config)
end
```

{% hint style="success" %}
By following these steps, you will successfully patch the `InitializeCharacter` function for the Illenium Appearance. Happy coding!
{% endhint %}

***

## Step 4: install guide for <mark style="color:red;">qb-clothing</mark>

1\. Open this file

```
qb-clothing/client/main.lua
```

2. Find the event handler

   ```
   RegisterNetEvent('qb-clothes:client:CreateFirstCharacter', function()
   ```
3. Updated code

```
RegisterNetEvent('qb-clothes:client:CreateFirstCharacter', function()
    QBCore.Functions.GetPlayerData(function(pData)
        local skin = "mp_m_freemode_01"
        openMenu({
            {menu = "character", label = Lang:t("menu.features"), selected = true},
            {menu = "hair", label = Lang:t("menu.hair"), selected = false},
            {menu = "clothing", label = Lang:t("menu.character"), selected = false},
            {menu = "accessoires", label = Lang:t("menu.accessoires"), selected = false}
        })

        if pData.charinfo.gender == 1 then
            skin = "mp_f_freemode_01"
        end

        ChangeToSkinNoUpdate(skin)
        SendNUIMessage({
            action = "ResetValues",
        })

        -- Add this at the end
        TriggerEvent("my-lifestyle:openUI")
    end)
end)

```

{% hint style="success" %}
By following these steps, you will successfully patch the `CreateFirstCharacter` event handler for the qb-clothing. Happy coding!
{% endhint %}
