mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-19 07:56:02 +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,
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user