onShopOpened
Last updated
Last updated
exports['sd-shops']:registerClientHook('onShopOpened', function(data)
-- Play door chime sound
PlaySoundFrontend(-1, 'DOOR_BUZZ', 'HUD_MINI_GAME_SOUNDSET', true)
-- Show welcome message for owned shops
if data.isShopOwned and data.ownerName then
lib.notify({
title = data.shopName,
description = 'Welcome! Owned by ' .. data.ownerName,
type = 'inform'
})
end
-- Log for analytics
print(('[SHOP] Player entered %s (ID: %s)'):format(data.shopName, data.shopId))
end)