Files
cfx-server-data/resources/[system]/sessionmanager/client/sessionstarter.lua
2016-12-15 13:40:07 +01:00

27 lines
810 B
Lua

-- more rline stuff, this does some late-term session management (which I think has some race condition with launching the network player?)
AddEventHandler('sessionInitialized', function()
if IsThisMachineTheServer() then
-- unknown stuff, seems needed though
NetworkChangeExtendedGameConfigCit()
CreateThread(function()
Wait(1500)
if not NetworkIsSessionStarted() then
NetworkStartSession()
while NetworkStartSessionPending() do
Wait(0)
end
if not NetworkStartSessionSucceeded() then
ForceLoadingScreen(0)
SetMsgForLoadingScreen("MO_SNI")
return
end
end
end)
end
end)