> For the complete documentation index, see [llms.txt](https://izaap-studios.gitbook.io/izaap-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://izaap-studios.gitbook.io/izaap-scripts/vip-weapons/exports-list.md).

# Exports List

## <mark style="color:$primary;">SERVER-SIDE</mark>

#### Grant a weapon from a saved template

```lua
exports["izaap_vipweapons"]:GrantWeaponTemplate(
    "license:123456789abcdef",
    4,
    "Haze",
    "30d",
    function(success, data)
        print("GrantWeaponTemplate success:", success)
        print(json.encode(data))
    end,
    "Tebex"
)
```

**Arguments**

* `identifier` — player license identifier
* `weaponId` — template ID from `izaap_weapons_templates`
* `name` — display name stored in database
* `duration` — supports `permanent`, `30d`, `12h`, `15m`, `45s`
* `cb` — callback function
* `issuer` — optional log issuer name such as `Tebex`, `WebStore`, or `Console`

***

#### Grant a direct weapon

```lua
exports["izaap_vipweapons"]:GrantWeaponDirect(
    "license:123456789abcdef",
    "WEAPON_CARBINERIFLE",
    "Carbine Rifle",
    "Haze",
    {
        suppressor = { name = "COMPONENT_AT_AR_SUPP", active = true },
        flashlight = { name = "COMPONENT_AT_AR_FLSH", active = true }
    },
    "15d",
    function(success, data)
        print("GrantWeaponDirect success:", success)
        print(json.encode(data))
    end,
    "WebStore"
)
```

**Arguments**

* `identifier` — player license identifier
* `weaponHash` — GTA weapon hash string
* `label` — custom label stored in database
* `name` — display name stored in database
* `components` — attachment table
* `duration` — supports `permanent`, `30d`, `12h`, `15m`, `45s`
* `cb` — callback function
* `issuer` — optional log issuer name

***

#### Grant a template weapon to an online player by source

```lua
exports["izaap_vipweapons"]:GrantWeaponTemplateToSource(
    17,
    4,
    "7d",
    function(success, data)
        print("GrantWeaponTemplateToSource success:", success)
        print(json.encode(data))
    end,
    "AdminPanel"
)
```

**Arguments**

* `targetSource` — player server ID
* `weaponId` — template ID
* `duration` — supports `permanent`, `30d`, `12h`, `15m`, `45s`
* `cb` — callback function
* `issuer` — optional log issuer name

***

#### Remove all VIP weapons by identifier

```lua
exports["izaap_vipweapons"]:RemoveWeaponsByIdentifier(
    "license:123456789abcdef",
    function(success, data)
        print("RemoveWeaponsByIdentifier success:", success)
        print(json.encode(data))
    end,
    "Tebex"
)
```

**Arguments**

* `identifier` — player license identifier
* `cb` — callback function
* `issuer` — optional log issuer name

***

#### Get all active VIP weapons by identifier

```lua
exports["izaap_vipweapons"]:GetWeaponsByIdentifier(
    "license:123456789abcdef",
    function(success, data)
        print("GetWeaponsByIdentifier success:", success)
        print(json.encode(data))
    end
)
```

**Arguments**

* `identifier` — player license identifier
* `cb` — callback function

***

### Example Tebex bridge usage

```lua
RegisterNetEvent("my_tebex_bridge:giveVipWeapon", function(packageData)
    local identifier = packageData.identifier
    local templateId = packageData.templateId
    local duration = packageData.duration or "30d"
    local playerName = packageData.playerName or "Web Customer"

    exports["izaap_vipweapons"]:GrantWeaponTemplate(
        identifier,
        templateId,
        playerName,
        duration,
        function(success, data)
            print("[TEBEX] Grant result:", success, json.encode(data))
        end,
        "Tebex"
    )
end)
```
