add basic support for RedM (RSGCore)

This commit is contained in:
Jim Shield
2025-04-07 20:52:59 +01:00
committed by GitHub
parent 4d8305c844
commit 2da2c56705
17 changed files with 552 additions and 244 deletions

View File

@@ -53,6 +53,9 @@ function onPlayerLoaded(func, onStart)
elseif isStarted(OXCoreExport) then
onPlayerFramework = OXCoreExport
AddEventHandler('ox:playerLoaded', tempFunc)
elseif isStarted(RSGExport) then
onPlayerFramework = RSGExport
AddEventHandler('RSGCore:Client:OnPlayerLoaded', tempFunc)
end
if onPlayerFramework ~= "" then
@@ -75,6 +78,7 @@ end
function onPlayerUnload(func)
AddEventHandler('QBCore:Client:OnPlayerUnload', function() func() end)
AddEventHandler('ox:playerLogout', function() func() end)
AddEventHandler('RSGCore:Client:OnPlayerUnload', function() func() end)
--AddEventHandler('esx:playerLogout', function() func() end)
-- ^ Only server side for now, need a way to send it to client if not already available