Hooks
Overview
Registration
Client-Side Registration
-- From another resource
exports['sd-shops']:registerClientHook('hookName', function(data)
-- Your logic here
end)
-- Returns a handlerId that can be used to unregister
local handlerId = exports['sd-shops']:registerClientHook('onShopOpened', function(data)
print('Shop opened: ' .. data.shopName)
end)
-- Unregister when no longer needed
exports['sd-shops']:unregisterClientHook('onShopOpened', handlerId)Server-Side Registration
Internal Registration
Multiple Handlers
Error Handling
Client Hooks
Hook
Description
Server Hooks
Hook
Description
Last updated