Empty public session.

Empty session heaven: eight easy methods


The purpose of this guide is to present a few common easy methods for creating an empty session in GTA Online. This process is sometimes also called “session splitting”, as it has the result that you will be kicked from any existing session to be put in a session on your own. A common use for this is to keep yourself safe from hackers and griefers, for instance, when the game puts you in a public lobby after a job.

Simple methods

Internet cable

Unplug your internet cable for about 10 seconds, then plug it back in. If timed right, everyone should disconnect from you, leaving you with an empty session. This is not the most reliable method, as it can easily fail if you get the timing wrong. But it is by far still the simplest method not requiring any 3rd party applications, as far as I am aware. You should leave it unplugged for a shorter time if you are thrown into story mode, and unplug it for a longer time if folks do not leave your session.

I cannot recall where I first learnt about this method, but it has been around for a really long time, and it still works.

Resource monitor

I found this method posted on steam by Bfy.

After starting GTA, start the resource monitor (either via the task manager under “Performance”, or directly from the windows start menu searching for the “Resource Monitor” app). Sort the list of processes by Threads (this makes sure GTA.exe remains at the top). Right click GTA.exe, select “Suspend Process”, and confirm. Wait about 10 seconds, then again right click, select “Resume Process”, and confirm. Again, adapt the delay until it works for you.

Using 3rd party tools

PsTools

This method is my old way of automating the resource monitor method, making it more reliable. It relies on a 3rd party program to suspend and resume the GTA.exe process. First, go and download PsTools from microsoft. Extract it to some location on your computer. You only need the pssuspend64.exe, so you can delete all files except that one. Now create a file called gta-suspend.bat (or anything you wish, as long as it has a .bat extension) in the same folder as pssuspend64.exe. Make sure to always keep these two files together. Copy and paste the following text into the .bat file:

%~dp0\pssuspend64.exe GTA5.exe
timeout 10
%~dp0\pssuspend64.exe GTA5.exe -r

You can create a shortcut to gta-suspend.bat on your desktop for ease of access. Right click the .bat file, and select Send To -> Desktop (create shortcut). Now, whenever you want to create an empty session, simply double click the shortcut to run the script. It will suspend GTA5 for 10 seconds, causing everyone to leave your session. Adapt the timeout value if it does not do the trick for you. You should lower it if you are thrown into story mode, and increase it if folks do not leave your session.

Autohotkey

A downside of the PsTools method is that you have to alt-tab out of the game whenever you want to suspend. The next method only requires you to alt-tab out of the game only once, just after starting GTA.

It also requires a third party program, called autohotkey. This program is very useful for productivity in general. So, if you use it for GTA then you may consider using it for other programs too. Anyway, go ahead and download it. Then copy and paste the code that I have written below into a file called gta-suspend.ahk (or whatever you like, as long as it has the .ahk extension). The code for suspend and resume is based on a script posted on the ahk forums by Bruttosozialprodukt.

After starting GTA, alt-tab out of the game and double click on the gta-suspend.ahk file to start the script. A green H icon should appear in your taskbar to indicate that the script is running. You can then, at any point, press right-control + delete to suspend the GTA process for 10 seconds. This will cause everyone to disconnect from your session. Tweak the SoloPublicDelay constant in the script below if a shorter or longer time works better for you. You can also edit the SoloPublicKey constant to change the hotkey to your liking. You can find a list of keys here.

The script also has a hotkey for killing the game if for some reason you cannot quit the game with alt F4 otherwise (this sometimes happens). By default, it is bound to right-control + backspace.

Note that the script will not work if you start the script before starting GTA, or when restarting GTA whilst the script is running. If that happens, just right-click the H icon in your taskbar, and select “Reload This Script”, after you’ve started GTA.

#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
#IfWinActive ahk_exe GTA5.exe
;=================================================================================
; Constants
;=================================================================================
SoloPublicDelay := 10000 ; For how long to suspend GTA to create a public solo lobby (in milliseconds).
;=================================================================================
; Hotkeys
;=================================================================================
SoloPublicKey := "RCtrl & Delete"
KillGameKey := "RCtrl & Backspace"
;=================================================================================
; Implementation
;=================================================================================
; Assign hotkeys
;---------------------------------------------------------------------------------
Hotkey, %SoloPublicKey%, SoloPublic
Hotkey, %KillGameKey%, KillGame
return
; Subroutines
;---------------------------------------------------------------------------------
SoloPublic:
    CallProcess("SuspendProcess")
    sleep, %SoloPublicDelay%
    CallProcess("ResumeProcess")
    return
KillGame:
    CallProcess("TerminateProcess")
    return
; Functions
;---------------------------------------------------------------------------------
SuspendProcess(process_handle)
{
    DllCall("ntdll.dll\NtSuspendProcess", Ptr, process_handle)
}
ResumeProcess(process_handle)
{
    DllCall("ntdll.dll\NtResumeProcess", Ptr, process_handle)
}
TerminateProcess(process_handle)
{
    DllCall("TerminateProcess", Ptr, process_handle, UInt, 0)
}
CallProcess(function_name)
{
    process_handle := DllCall("OpenProcess", UInt, 0x1F0FFF, UInt, 0, UInt, PidValue())
    %function_name%(process_handle)
    DllCall("CloseHandle", Ptr, process_handle)
}
PidValue()
{
    WinGet, pid_value, PID, ahk_exe GTA5.exe
    return %pid_value%
}

Guardian

Guardian is an open source application, originally developed by DigitalArc Studio, and currently maintained by Speyedr, which allows you not just to lag out from a session, but permanently block connections with other players. You can enable it temporarily to split the session, or keep it enabled to block others from joining you completely.

So go ahead and download the latest version of Guardian. Currently, only Solo Session and Locked Session work reliably. The application is not hard to use, but it is definitely one of the more complex solutions listed here, so be sure to very carefully read the instructions!

You can use the following AutoHotKey script (originally written by saxtus for the stream deck, with some minor edits by myself to make it work with keyboard hotkeys instead) to avoid having to alt-tab out of the game to start and stop Guardian. The hotkeys are right-control + page-up to start a solo session, and right-control + page-down to stop a solo session. Important: you must start this script as administrator for it to work. This is because Guardian also needs to run as administrator.

#SingleInstance, Force
SetTitleMatchMode 1
>^PgUp::
ControlSend,, {Enter}{Enter}, Guardian
Return
>^PgDn::
ControlSend,, ^c, Guardian
Return

Old methods

I have not recently tested any of the methods below, so they may or may not work for you. I’ve kept them here for historical interest.

Firewall

This method may still work, although I have not tested it recently. A benefit is that it also prevents other people from joining your session, ensuring that you stay alone. It could be combined with one of the above methods.

@lorsch (see forum post) tells us to go into the Firewall Settings. If you are on Windows 10, click on the start menu, and then choose the gear wheel on the left to go into the Settings. On the next window, click on Network and Internet -> Ethernet -> Windows Firewall. Now, click on Advanced Settings, then on outgoing rules -> new rule. Click on port -> next -> UDP -> Specific remote ports: 6672, 61455, 61456, 61457, 61458 -> next -> block the connection -> next -> next -> give it any name of your choice, e.g. “_GtaOnlineSafe”. Note that I’ve given it an underscore at the beginning to ensure that it always appears at the top of the list of firewall rules.

With a right click on the new rule, you can activate or deactivate it. If you activate it, the next time you switch the session or join GTA Online you will end up in a solo session. Nobody will be able to join this session. If you want to invite people, just deactivate the rule. You can just activate it after they joined to avoid random players joining.

@meriandar provided the .bat script below to automate the process. Remember to run it as administrator, and edit the name of you rule.

@ECHO OFF
:start
set /p cmd="Enter command; E(nable rule), D(isable rule), Q(uit): "
if %cmd%==q GOTO :EOF
if %cmd%==e (
    Netsh AdvFirewall Firewall set rule name="_GtaOnlineSafe" new enable=yes
    echo Rule enabled
)
if %cmd%==d (
    Netsh AdvFirewall Firewall set rule name="_GtaOnlineSafe" new enable=no
    echo Rule disabled
)
GOTO start

Session sweeper

@lorsch noted Session Sweeper (see forum post) as another method. However, it looks like this program is no longer maintained. Your mileage may vary.

Netlimiter

@mikemichael225 pointed us to netlimiter (see forum post) as yet another method. A “feature” of this method is that any friends that try to join your session (intentionally or by coincidence) will get stuck in the clouds. So if you use this, be sure to set your in-game presence visibility to “me only”, via the social club menu:

That’s it! I hope you found this useful. If you know of any other simple convenient methods not covered above, leave a comment. Enjoy your empty session!

Leave a comment