# Tutorials

## Config.lua tutorial:

{% embed url="<https://www.youtube.com/watch?v=iC7wfVIm5KE>" %}
Config tutorial
{% endembed %}

## Other tutorials:

<details>

<summary>How to enable command only for admins (ESX)</summary>

Modify existing command code in `server/utils.lua` to look like this:

```lua
-- COMMAND
-- WARNING: THIS COMMAND IS AVAILABLE FOR EVERYONE BY DEFAULT, CHANGE THE CODE BELOW TO ONLY ALLOW CERATIN PEOPLE TO CALL THE AIRDROP!
if Config.AirdropSpawnMethod['command_enabled'] then
    RegisterCommand("airdrop", function(source, args, rawCommand)
        local xPlayer = Framework.GetPlayerFromId(source)
        if (xPlayer.group == 'superadmin' or xPlayer.group == 'admin' or xPlayer.group == 'mod') then
            createNewAirdrop({type = "command", src = source, arg = args})
        end
    end)
end
```

You can add/remove groups as required

</details>

<details>

<summary>How to enable command only for admins (QBcore/Qbox)</summary>

Soon

</details>

<details>

<summary>How to synchronize airdrops for players joining the server</summary>

Soon

</details>

<details>

<summary>How to spawn airdrop using arguments (choose place and type)</summary>

Soon

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.poisoncode.com/scripts/pc_airdrop/tutorials.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
