Docs/Library/Modules/registerTebexHook

Register Tebex Hook

Library
Updated 2 months ago · v1.3.7
i

Server Module

lib.registerTebexHook

Registers Tebex integration commands for handling store purchases, removals, and renewals.

lua
lib.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,
})
ParameterTypeRequiredDescription
datatableyesHook configuration (see below)

Data Properties

PropertyTypeRequiredDescription
idstringyesUnique hook identifier
labelstringyesDisplay label
onPurchasefunctionnofunction(cfxId, args) — called on purchase
onRemovefunctionnofunction(cfxId, args) — called on removal
onRenewfunctionnofunction(cfxId, args) — called on renewal

Registered Commands

Each hook registers up to three server commands (restricted — only executable from source 0 / console):

CommandTrigger
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.

i

Configure these commands in your Tebex package settings to connect store events to your server logic.

Was this page helpful?
This page was last updated on 12 March 2026
DIRKSCRIPTS
All you need for your FiveM server.10% off your first order

Unsubscribe any time.

Copyright © 2026 DirkScripts. Not affiliated with or endorsed by Rockstar North or Take-Two Interactive.