DirkScripts
Docs
Register Tebex Hook
βΉοΈ Server Module
#lib.registerTebexHook
Registers Tebex integration commands for handling store purchases, removals, and renewals.
lualib.registerTebexHook({ id = 'vip_access', label = 'VIP Access', onPurchase = function(cfxId, args) print(cfxId .. ' purchased VIP') end, onRemove = function(cfxId, args) print(cfxId .. ' VIP removed') end, onRenew = function(cfxId, args) print(cfxId .. ' VIP renewed') end, })
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | table | yes | Hook configuration (see below) |
#Data Properties
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Unique hook identifier |
| label | string | yes | Display label |
| onPurchase | function | no | function(cfxId, args) β called on purchase |
| onRemove | function | no | function(cfxId, args) β called on removal |
| onRenew | function | no | function(cfxId, args) β called on renewal |
#Registered Commands
Each hook registers up to three server commands (restricted β only executable from source 0 / console):
| Command | Trigger |
|---|---|
dirk_purchase_{id} | Purchase event |
dirk_remove_{id} | Removal event |
dirk_renew_{id} | Renewal event |
The first argument to each command is the player's CFX identifier.
βΉοΈ Configure these commands in your Tebex package settings to connect store events to your server logic.
Last updated on 12 March 2026
