DirkScripts Logo

Login With FiveM

Login

πŸ“š Library
β€Ί
Modules
β€Ί

registerTebexHook

Register Tebex Hook

ℹ️ 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.

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

Copyright Β© 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.