onGiftPurchaseCompleted
Purpose
When It Triggers
Parameters
Parameter
Type
Description
Example
exports['sd-shops']:registerClientHook('onGiftPurchaseCompleted', function(data)
-- Play gift sound
PlaySoundFrontend(-1, 'CHALLENGE_UNLOCKED', 'HUD_AWARDS', true)
-- Show success notification
lib.notify({
title = 'Gift Sent!',
description = ('Items sent to %s'):format(data.targetPlayerName),
type = 'success'
})
-- Log completed gift
print(('[GIFT] Successfully sent %d items ($%d) to %s'):format(
#data.items, data.totalAmount, data.targetPlayerName
))
end)Last updated