Skip to content

Instantly share code, notes, and snippets.

@milypoint
Last active April 20, 2024 17:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save milypoint/a4971e45ff50cbe339ea19f5fecad08f to your computer and use it in GitHub Desktop.
Save milypoint/a4971e45ff50cbe339ea19f5fecad08f to your computer and use it in GitHub Desktop.
Hide map in Rust (playrust.com) while streaming for OBS Studio
/*
AutoHotKey script for hide map in Rust game while streaming in OBS Studio.
Steps for setup:
1. Download and install AutoHotKey from official website "www.autohotkey.com".
2. In your main scene in OBS create a new source that will be cover game capture scene. For example it can be some image source. Let's call it <hidden content>.
3. In OBS settings go to hotkeys and bind
g - for showing <hidden content> source
NumPad1 - for hide <hidden content> source
4. Save this file with *.ahk filename extension then right click on file -> Run Script. Also you can right click on file -> Compile Script. It gives you *.exe program of your script. Press Win+R and type
"shell:startup" and press Enter. Put *.exe file in the folloving folder for run it on Windows startup.
*/
; Bollean variable for detect if NumPad0 was pressed while Sleep statement in Escape macro.
exit_escape = True
*~g::
while (getkeystate("g")) {
Sleep, 20
}
controlSend, Qt5QWindowIcon17,{NumPad1},ahk_class Qt5QWindowIcon
Exit
/*
Next block using for case when you are playing without streamer mode in rust (global.streamermode "False"). If you do streamer mode eneble just remove it from this file.
*/
*~Escape::
controlSend, Qt5QWindowIcon17,{g},ahk_class Qt5QWindowIcon
Sleep, 5000 ; Put your number of milliseconds
if (!exit_escape) {
controlSend, Qt5QWindowIcon17,{NumPad1},ahk_class Qt5QWindowIcon
exit_escape = False
}
*~NumPad0::
controlSend, Qt5QWindowIcon17,{g},ahk_class Qt5QWindowIcon
exit_escape = True
@C74K
Copy link

C74K commented Oct 9, 2020

Dont work map is visible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment