mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
refactor(init): change notify netevent name
Other name was too generic and may conflict with user-code.
This commit is contained in:
4
init.lua
4
init.lua
@@ -157,7 +157,7 @@ if context == 'client' then
|
||||
end,
|
||||
})
|
||||
|
||||
RegisterNetEvent(('%s:notify'):format(cache.resource), function(data)
|
||||
RegisterNetEvent(('__ox_notify_%s'):format(cache.resource), function(data)
|
||||
if locale then
|
||||
if data.title then
|
||||
data.title = locale(data.title) or data.title
|
||||
@@ -174,7 +174,7 @@ if context == 'client' then
|
||||
cache.playerId = PlayerId()
|
||||
cache.serverId = GetPlayerServerId(cache.playerId)
|
||||
else
|
||||
local notify = ('%s:notify'):format(cache.resource)
|
||||
local notify = ('__ox_notify_%s'):format(cache.resource)
|
||||
|
||||
function lib.notify(source, data)
|
||||
TriggerClientEvent(notify, source, data)
|
||||
|
||||
Reference in New Issue
Block a user