> For the complete documentation index, see [llms.txt](https://tradiekm.gitbook.io/resources/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tradiekm.gitbook.io/resources/paid-resources/airsoft.md).

# td-airsoft

<figure><img src="/files/nwm91QE8zqedGPcJJWoI" alt=""><figcaption></figcaption></figure>

***

{% hint style="info" %}
**Installation**
{% endhint %}

**Download your script via** [**keymaster**](https://keymaster.fivem.net/asset-grants)**.**&#x20;

**You will also receive a download in your email containing 4 edited free map**s.

**Before you run td-airsoft, make sure you have some maps installed/configured.**

**Configure the config file. Config.Core can be QB, ESX or QBOX.**&#x20;

> **Use "CUSTOM" Config.Core if you use any other framework and fill in the functions in `Core_functions`. We will use those to determine when the EMS script marks the player dead, grab their character name, revive them, and get weapons list. For server notifications on this setting we recommend sticking to ox\_lib**

<figure><img src="/files/S3SyuQW7pXYbh4Lp6Lva" alt=""><figcaption><p>Config</p></figcaption></figure>

{% hint style="info" %}
Exports/usage
{% endhint %}

Use the client export **`exports['td-airsoft']:IsInMatch()`** to check if a player is in a game

***

{% hint style="info" %}
Fix weapon removal (Qbox/ox\_inventory)
{% endhint %}

In: **`ox_inventory/modules/weapon/client.lua`:**

<pre><code>function Weapon.Disarm(currentWeapon, noAnim)
<strong>if exports['td-airsoft']:IsInMatch() then return end 
</strong>... rest of the code
end

</code></pre>

***

{% hint style="info" %}
Disable Dispatch Gunshots (ps-dispatch)
{% endhint %}

In: **`ps-dispatch/client/alerts.lua`:**

<pre><code>local function Shooting()
<strong>if exports['td-airsoft']:IsInMatch() then return end
</strong>// rest of the code
end
exports('Shooting', Shooting)
</code></pre>

***

{% hint style="info" %}
Frameworks other thank QB/ESX/QBX need to import their functions in the files below:
{% endhint %}

**Core\_functions/Core\_Server.lua**

<figure><img src="/files/T51WUIIFyJSeFm5Y25cd" alt=""><figcaption><p>Server Core Functions</p></figcaption></figure>

***

**Core\_functions/Core\_Client.lua**

<figure><img src="/files/RH8AgsDjJWzlKy1fqemk" alt=""><figcaption><p>Client Core Functions</p></figcaption></figure>
