refactor(init): change notify netevent name

Other name was too generic and may conflict with user-code.
This commit is contained in:
Linden
2023-02-03 13:04:48 +11:00
parent a8b9f8cde5
commit 1565187860

View File

@@ -157,7 +157,7 @@ if context == 'client' then
end, end,
}) })
RegisterNetEvent(('%s:notify'):format(cache.resource), function(data) RegisterNetEvent(('__ox_notify_%s'):format(cache.resource), function(data)
if locale then if locale then
if data.title then if data.title then
data.title = locale(data.title) or data.title data.title = locale(data.title) or data.title
@@ -174,7 +174,7 @@ if context == 'client' then
cache.playerId = PlayerId() cache.playerId = PlayerId()
cache.serverId = GetPlayerServerId(cache.playerId) cache.serverId = GetPlayerServerId(cache.playerId)
else else
local notify = ('%s:notify'):format(cache.resource) local notify = ('__ox_notify_%s'):format(cache.resource)
function lib.notify(source, data) function lib.notify(source, data)
TriggerClientEvent(notify, source, data) TriggerClientEvent(notify, source, data)