> For the complete documentation index, see [llms.txt](https://securgate.gitbook.io/securgate/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://securgate.gitbook.io/securgate/docs/client-side-configurations/anti-give-weapon.md).

# Anti Give Weapon

## Put our Trigger before GiveWeaponToPed Natives

{% hint style="info" %}
**Note:** Others Natives can give weapons so add our trigger before them too.
{% endhint %}

## Syntax

```lua
Manager = exports["SecurGate"]:GetManager()
Manager.GiveSafeWeapon([WEAPON NAME], GetCurrentResourceName())
```

### Exemple :

<pre class="language-lua" data-title="client_side.lua"><code class="lang-lua">-- Default script exemple :
RegisterCommand("giveweapon", function(source, args)
    GiveWeaponToPed(PlayerPedId(), GetHashKey(args[1]), 255, false, true)
end)

-- Protected Script exemple : 

RegisterCommand("giveweapon", function(source, args)
    Manager = exports["SecurGate"]:GetManager()
<strong>    Manager.GiveSafeWeapon(args[1], GetCurrentResourceName())
</strong>    Wait(50) -- Add a little wait to make sure the weapon is register in SecurGate.
    GiveWeaponToPed(PlayerPedId(), GetHashKey(args[1]), 255, false, true)
end)

</code></pre>
