Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :restart
- :: ******************************************************
- :: * LIGHTWEIGHT GRAND THEFT AUTO V MOD SWITCHER *
- :: * By *
- :: * RainBawZ *
- :: * SocialClub: kukpappa *
- :: * --NO AUTO-UPDATE-- *
- :: ******************************************************
- setlocal enabledelayedexpansion
- mode con cols=100 lines=50
- set curfile=gtavms.bat
- set dbg=0
- set force=0
- set single=0
- set break=0
- if /i "%1"=="debug" (
- @Echo on
- set dbg=1
- prompt GTAVMS CODE EXECUTION$S$G$G$S
- if /i "%2"=="force" (
- set force=1
- )
- ) else (
- @Echo off
- )
- if /i "%1"=="force" (
- set force=1
- )
- title GTA V Mod Switcher [v!version!]
- color 8F
- for /F "tokens=1,2 delims=#" %%A in ('"prompt #$H#$E# & echo on & for %%B in (1) do rem"') do (
- set "DEL=%%A"
- )
- set protected=bink2w64.dll,common.rpf,d3dcompiler_46.dll,d3dcsx_46.dll,GFSDK_ShadowLib.win64.dll,GFSDK_TXAA.win64.dll,GFSDK_TXAA_AlphaResolve.win64.dll,GTA5.exe,GTAVLauncher.exe,installscript.vdf,steam_api64.dll,x64a.rpf,x64b.rpf,x64c.rpf,x64d.rpf,x64e.rpf,x64f.rpf,x64g.rpf,x64h.rpf,x64i.rpf,x64j.rpf,x64k.rpf,x64l.rpf,x64m.rpf,x64n.rpf,x64o.rpf,x64p.rpf,x64q.rpf,x64r.rpf,x64s.rpf,x64t.rpf,x64u.rpf,x64v.rpf,x64w.rpf,update\update.rpf,update\x64\metadata.dat,update\x64\data\errorcodes\american.txt,update\x64\data\errorcodes\chinese.txt,update\x64\data\errorcodes\french.txt,update\x64\data\errorcodes\german.txt,update\x64\data\errorcodes\italian.txt,update\x64\data\errorcodes\japanese.txt,update\x64\data\errorcodes\korean.txt,update\x64\data\errorcodes\mexican.txt,update\x64\data\errorcodes\polish.txt,update\x64\data\errorcodes\portuguese.txt,update\x64\data\errorcodes\russian.txt,update\x64\data\errorcodes\spanish.txt,update\x64\dlcpacks\mpchristmas2\dlc.rpf,update\x64\dlcpacks\mpheist\dlc.rpf,update\x64\dlcpacks\mpluxe\dlc.rpf,update\x64\dlcpacks\mpluxe2\dlc.rpf,update\x64\dlcpacks\mppatcheseng\dlc.rpf,update\x64\dlcpacks\patchday1ng\dlc.rpf,update\x64\dlcpacks\patchday2bng\dlc.rpf,update\x64\dlcpacks\patchday2ng\dlc.rpf,update\x64\dlcpacks\patchday3ng\dlc.rpf,update\x64\dlcpacks\patchday4ng\dlc.rpf,update\x64\dlcpacks\patchday5ng\dlc.rpf,x64\metadata.dat,x64\audio\audio_rel.rpf,x64\audio\occlusion.rpf,x64\audio\sfx\ANIMALS.rpf,x64\audio\sfx\ANIMALS_FAR.rpf,x64\audio\sfx\ANIMALS_NEAR.rpf,x64\audio\sfx\CUTSCENE_MASTERED_ONLY.rpf,x64\audio\sfx\DLC_GTAO.rpf,x64\audio\sfx\INTERACTIVE_MUSIC.rpf,x64\audio\sfx\ONESHOT_AMBIENCE.rpf,x64\audio\sfx\PAIN.rpf,x64\audio\sfx\POLICE_SCANNER.rpf,x64\audio\sfx\PROLOGUE.rpf,x64\audio\sfx\RADIO_01_CLASS_ROCK.rpf,x64\audio\sfx\RADIO_02_POP.rpf,x64\audio\sfx\RADIO_03_HIPHOP_NEW.rpf,x64\audio\sfx\RADIO_04_PUNK.rpf,x64\audio\sfx\RADIO_05_TALK_01.rpf,x64\audio\sfx\RADIO_06_COUNTRY.rpf,x64\audio\sfx\RADIO_07_DANCE_01.rpf,x64\audio\sfx\RADIO_08_MEXICAN.rpf,x64\audio\sfx\RADIO_09_HIPHOP_OLD.rpf,x64\audio\sfx\RADIO_11_TALK_02.rpf,x64\audio\sfx\RADIO_12_REGGAE.rpf,x64\audio\sfx\RADIO_13_JAZZ.rpf,x64\audio\sfx\RADIO_14_DANCE_02.rpf,x64\audio\sfx\RADIO_15_MOTOWN.rpf,x64\audio\sfx\RADIO_16_SILVERLAKE.rpf,x64\audio\sfx\RADIO_17_FUNK.rpf,x64\audio\sfx\RADIO_18_90S_ROCK.rpf,x64\audio\sfx\RADIO_ADVERTS.rpf,x64\audio\sfx\RADIO_NEWS.rpf,x64\audio\sfx\RESIDENT.rpf,x64\audio\sfx\S_FULL_AMB_F.rpf,x64\audio\sfx\S_FULL_AMB_M.rpf,x64\audio\sfx\S_FULL_GAN.rpf,x64\audio\sfx\S_FULL_SER.rpf,x64\audio\sfx\S_MINI_AMB.rpf,x64\audio\sfx\S_MINI_GAN.rpf,x64\audio\sfx\S_MINI_SER.rpf,x64\audio\sfx\S_MISC.rpf,x64\audio\sfx\SCRIPT.rpf,x64\audio\sfx\SS_AC.rpf,x64\audio\sfx\SS_DC.rpf,x64\audio\sfx\SS_FF.rpf,x64\audio\sfx\SS_GM.rpf,x64\audio\sfx\SS_NP.rpf,x64\audio\sfx\SS_QR.rpf,x64\audio\sfx\SS_ST.rpf,x64\audio\sfx\SS_UZ.rpf,x64\audio\sfx\STREAMED_AMBIENCE.rpf,x64\audio\sfx\STREAMED_VEHICLES.rpf,x64\audio\sfx\STREAMED_VEHICLES_GRANULAR.rpf,x64\audio\sfx\STREAMED_VEHICLES_GRANULAR_NPC.rpf,x64\audio\sfx\STREAMED_VEHICLES_LOW_LATENCY.rpf,x64\audio\sfx\STREAMS.rpf,x64\audio\sfx\WEAPONS_PLAYER.rpf
- set rootDrive="%~d0"
- cls
- if !dbg!==1 (
- del /q GTAVMS_debug.bat > nul
- )
- Echo Initializing GTAV Mod Switcher...
- Echo.
- if not exist GTAVMS_debug.bat (
- Echo Creating debug script...
- Echo @Echo off > GTAVMS_debug.bat
- Echo setlocal enabledelayedexpansion >> GTAVMS_debug.bat
- Echo for /F "tokens=1,2 delims=#" %%%%A in ^('"prompt #$H#$E# & echo on & for %%%%B in (1) do rem"'^) do ^( >> GTAVMS_debug.bat
- Echo set "DEL=%%%%A" >> GTAVMS_debug.bat
- Echo ^) >> GTAVMS_debug.bat
- Echo color 8C >> GTAVMS_debug.bat
- Echo call :clr 8F " ***DEBUGGER*** " >> GTAVMS_debug.bat
- Echo Echo. >> GTAVMS_debug.bat
- Echo call :clr 89 "*COLLECTING DATA. Please wait...*" >> GTAVMS_debug.bat
- Echo call :clr 8F "----------" >> GTAVMS_debug.bat
- Echo call :clr 8C "Error log:" >> GTAVMS_debug.bat
- Echo call gtavms debug force ^>gtavms_debug_log.log >> GTAVMS_debug.bat
- Echo @Echo off >> GTAVMS_debug.bat
- Echo call :clr 8F "----------" >> GTAVMS_debug.bat
- Echo call :clr 8A "*DONE*" >> GTAVMS_debug.bat
- Echo pause ^> nul >> GTAVMS_debug.bat
- Echo exit >> GTAVMS_debug.bat
- Echo :clr >> GTAVMS_debug.bat
- Echo ^<nul ^> X set /p ".=." >> GTAVMS_debug.bat
- Echo set "param=^^%%^~2" ^^! >> GTAVMS_debug.bat
- Echo set "param=^!param:"=^\"^!" >> GTAVMS_debug.bat
- Echo findstr /p /A:%%1 "." "^!param^!\..\X" nul >> GTAVMS_debug.bat
- Echo ^<nul set /p ".=%%DEL%%%%DEL%%%%DEL%%%%DEL%%%%DEL%%%%DEL%%%%DEL%%" >> GTAVMS_debug.bat
- Echo del /q X ^> nul >> GTAVMS_debug.bat
- Echo Echo. >> GTAVMS_debug.bat
- Echo exit /b >> GTAVMS_debug.bat
- call :ColorMsg 8A " OK"
- Echo.
- )
- Echo Querying registry for GTAVMS version...
- reg query HKCU\Software\FoddEx\GTAVMS /v version > nul
- if !errorlevel!==1 (
- call :ColorMsg 8E " No entry. Adding..."
- set version=1.5.1
- reg add HKCU\Software\FoddEx\GTAVMS /f /v version /t REG_SZ /d "!version!" > nul
- call :ColorMsg 8A " OK"
- ) else (
- for /f "tokens=2* skip=2" %%A in ('reg query HKCU\Software\FoddEx\GTAVMS /v version') do (
- set version=%%B
- )
- call :ColorMsg 8A " OK"
- )
- Echo.
- Echo Setting title...
- title GTA V Mod Switcher [v!version!]
- call :ColorMsg 8A " OK"
- Echo.
- :pre.cnt
- Echo Checking GTA5 process...
- tasklist /fi "IMAGENAME eq GTA5.exe" | find /i "GTA5.exe" > nul
- if !errorlevel!==0 (
- cls
- call :ColorMsg 8C "GTA V is running."
- Echo.
- Echo Modifying game files while the game is running
- Echo might affect game behavior and gameplay.
- Echo.
- Echo Press any key to continue.
- if !force!==0 pause > nul
- cls
- )
- call :ColorMsg 8A " OK"
- Echo.
- if not !search!==1 (
- Echo Querying registry for GTA path...
- reg query HKCU\Software\FoddEx\GTAVMS /v path > nul
- ) else (
- set errorlevel=1
- )
- if !errorlevel!==1 (
- cls
- Echo Locating Grand Theft Auto V installation. Please be patient...
- Echo NOTE: The duration may vary depending on the size of your
- Echo file system and number of disks.
- Echo.
- for /f "tokens=2 delims==" %%Z in ('wmic logicaldisk get name /value') do (
- Echo **%%Z**>tmp
- for /f %%C in (tmp) do (
- set disk=%%C
- set disk=!disk:~2,-3!
- Echo Searching !disk!\ drive...
- del /q tmp > nul
- for /f "tokens=*" %%A in ('dir "!disk!\GTA5.exe" /b /s 2^> nul') do (
- for /f "tokens=*" %%I in ("%%A") do (
- set pDrive=%%~dI
- set pPath=%%~pI
- Echo.
- call :ColorMsg 89 " GTA V.exe file: %%I"
- call :ColorMsg 89 " Disk: !pDrive!"
- call :ColorMsg 89 " Disk location: !pPath!"
- Echo.
- Echo Is this correct? Y/N
- if !force!==1 (
- Echo END
- endlocal
- exit /b
- )
- set /p conf=">> "
- if /i "!conf!"=="Y" (
- set gtaPath=!pDrive!!pPath!
- if exist "!gtaPath!" (
- reg add HKCU\Software\FoddEx\GTAVMS /f /v path /t REG_SZ /d "!gtaPath!" > nul
- if "%%~dI"=="!rootDrive!" (
- cd "%%~dpI"
- ) else (
- cd /d "%%~dpI"
- )
- cd..
- goto search.break
- ) else (
- call :ColorMsg 8C "An unknown error occurred."
- if !force!==0 pause > nul
- endlocal
- exit /b
- )
- )
- )
- )
- )
- call :ColorMsg 8C " Done. No result"
- Echo.
- )
- ) else (
- for /f "tokens=2* skip=2" %%A in ('reg query HKCU\Software\FoddEx\GTAVMS /v path') do (
- set gtaPath=%%B
- if exist "!gtaPath!" (
- for /f "tokens=*" %%C in ("!gtaPath!") do (
- if "!_drive!"=="!rootDrive!" (
- cd "%%C"
- ) else (
- cd /d "%%C"
- )
- cd..
- )
- call :ColorMsg 8A " OK"
- goto search.break
- )
- call :ColorMsg 8C "Registry value "HKCU\Software\FoddEx\GTAVMS\path" contains invalid data."
- Echo.
- goto manualPath
- )
- )
- :manualPath
- Echo Unable to locate Grand Theft Auto V on your computer.
- Echo Please enter the path manually.
- if !force!==1 (
- Echo END
- endlocal
- exit /b
- )
- set /p gtaPath="Path: "
- if not exist "!gtaPath!\GTA5.exe" (
- call :ColorMsg 8C "!gtaPath! is not a valid path."
- timeout /t 3 > nul
- cls
- goto manualPath
- ) else (
- reg add HKCU\Software\FoddEx\GTAVMS /f /v path /t REG_SZ /d "!gtaPath!" > nul
- goto search.break
- )
- :reset
- :search.break
- timeout /t 1 > nul
- set "curDir=%cd%"
- if not exist "Grand Theft Auto V\GTA5.exe" (
- cls
- call :ColorMsg 8C "An error occurred."
- if !dbg!==1 (
- Echo.
- Echo ERROR: GTA5.EXE not found in "%cd%"
- )
- Echo.
- Echo Press any key to run a new search.
- if !force!==0 pause > nul
- reg delete HKCU\Software\FoddEx\GTAVMS /v /f path > nul
- cls
- endlocal
- set search=1
- goto restart
- )
- set "gtaBin=Grand Theft Auto V"
- if not exist GTAVmodBin (
- mkdir GTAVmodBin
- )
- set modBin=GTAVmodBin
- :analyze
- set asiList=
- set ModAsiList=
- set dllList=
- set ModDllList=
- set txtList=
- set ModTxtList=
- set asiCount=0
- set ModAsiCount=0
- set dllCount=0
- set ModDllCount=0
- set txtCount=0
- set ModTxtCount=0
- cls
- Echo Analyzing Mods directory...
- for /f %%A in ('dir /b "!modBin!\*.asi" 2^> nul') do (
- set /a ModAsiCount=!ModAsiCount!+1
- set ModAsiList=!ModAsiList!,%%A
- )
- Echo Found !ModAsiCount! .asi files.
- Echo.
- for /f %%A in ('dir /b "!modBin!\*.dll" 2^> nul') do (
- set /a ModDllCount=!ModDllCount!+1
- set ModDllList=!ModDllList!,%%A
- )
- Echo Found !ModDllCount! .dll files.
- Echo.
- for /f %%A in ('dir /b "!modBin!\*.txt" 2^> nul') do (
- set /a ModTxtCount=!ModTxtCount!+1
- set ModTxtList=!ModTxtList!,%%A
- )
- for /f %%A in ('dir /b "!modBin!\*.ini" 2^> nul') do (
- set /a ModTxtCount=!ModTxtCount!+1
- set ModTxtList=!ModTxtList!,%%A
- )
- for /f %%A in ('dir /b "!modBin!\*.inf" 2^> nul') do (
- set /a ModTxtCount=!ModTxtCount!+1
- set ModTxtList=!ModTxtList!,%%A
- )
- for /f %%A in ('dir /b "!modBin!\*.cfg" 2^> nul') do (
- set /a ModTxtCount=!ModTxtCount!+1
- set ModTxtList=!ModTxtList!,%%A
- )
- Echo Found !ModTxtCount! mod related plain-text files.
- Echo.
- if exist !modBin!\scripts (
- Echo Found scripts folder for .NET mods.
- Echo.
- )
- Echo ----------
- Echo Analyzing GTA V directory...
- for /f %%A in ('dir /b "!gtaBin!\*.asi" 2^> nul') do (
- set /a asiCount=!asiCount!+1
- set asiList=!asiList!,%%A
- )
- Echo Found !asiCount! .asi files.
- Echo.
- for /f %%A in ('dir /b "!gtaBin!\*.dll" 2^> nul') do (
- if not %%A==bink2w64.dll (
- if not %%A==d3dcompiler_46.dll (
- if not %%A==GFSDK_ShadowLib.win64.dll (
- if not %%A==GFSDK_TXAA.win64.dll (
- if not %%A==GFSDK_TXAA_AlphaResolve.win64.dll (
- if not %%A==steam_api64.dll (
- if not %%A==d3dcsx_46.dll (
- set /a dllCount=!dllCount!+1
- set dllList=!dllList!,%%A
- )
- )
- )
- )
- )
- )
- )
- )
- Echo Found !dllCount! non standard .dll files.
- Echo.
- for /f %%A in ('dir /b "!gtaBin!\*.txt" 2^> nul') do (
- set /a txtCount=!txtCount!+1
- set txtList=!txtList!,%%A
- )
- for /f %%A in ('dir /b "!gtaBin!\*.ini" 2^> nul') do (
- set /a txtCount=!txtCount!+1
- set txtList=!txtList!,%%A
- )
- for /f %%A in ('dir /b "!gtaBin!\*.inf" 2^> nul') do (
- set /a txtCount=!txtCount!+1
- set txtList=!txtList!,%%A
- )
- for /f %%A in ('dir /b "!gtaBin!\*.cfg" 2^> nul') do (
- set /a txtCount=!txtCount!+1
- set txtList=!txtList!,%%A
- )
- Echo Found !txtCount! mod related plain-text files.
- Echo.
- if exist !gtaBin!\scripts (
- Echo Found scripts folder for .NET mods.
- Echo.
- )
- Echo.
- Echo Done.
- timeout /t 2 > nul
- goto main
- :main
- set modActive=0
- set modInactive=0
- cls
- call :ColorMsg 89 "Active mods:"
- if exist !gtaBin!\NativeTrainer.asi (
- call :ColorMsg 8A " -Native Trainer [NativeTrainer.asi]"
- Echo.
- set modActive=1
- )
- if exist !gtaBin!\ScriptHookV.dll (
- call :ColorMsg 8A " -Script Hook V [ScriptHookV.dll]"
- Echo.
- set modActive=1
- )
- if exist !gtaBin!\OpenIV.asi (
- call :ColorMsg 8A " -OpenIV ASI Loader [OpenIV.asi]"
- Echo.
- set modActive=1
- )
- if exist !gtaBin!\ScriptHookVDotNet.asi (
- set modActive=1
- if exist !gtaBin!\ScriptHookVDotNet.dll (
- call :ColorMsg 8A " -Script Hook V .NET [ScriptHookVDotNet.asi]"
- call :ColorMsg 8A " -Script Hook V .NET [ScriptHookVDotNet.dll]"
- Echo.
- ) else (
- call :ColorMsg 8E " -Script Hook V .NET [ScriptHookVDotNet.asi]"
- Echo.
- )
- ) else (
- if exist !gtaBin!\ScriptHookVDotNet.dll (
- set modActive=1
- call :ColorMsg 8E " -Script Hook V .NET [ScriptHookVDotNet.dll]"
- Echo.
- )
- )
- if exist !gtaBin!\dinput8.dll (
- call :ColorMsg 8A " -ASI Loader [dinput8.dll]"
- Echo.
- set modActive=1
- )
- if !asiCount! GTR 1 (
- set modActive=1
- Echo -One or more unknown mod scripts/DLLs:
- for /f %%A in ('dir /b "!gtaBin!\*.asi" 2^> nul') do (
- if not %%A==NativeTrainer.asi (
- if not %%A==ScriptHookVDotNet.asi (
- if not %%A==OpenIV.asi (
- call :ColorMsg 8A " -%%A"
- Echo.
- )
- )
- )
- )
- for /f %%A in ('dir /b "!gtaBin!\*.dll" 2^> nul') do (
- if not %%A==bink2w64.dll (
- if not %%A==d3dcompiler_46.dll (
- if not %%A==GFSDK_ShadowLib.win64.dll (
- if not %%A==GFSDK_TXAA.win64.dll (
- if not %%A==GFSDK_TXAA_AlphaResolve.win64.dll (
- if not %%A==steam_api64.dll (
- if not %%A==d3dcsx_46.dll (
- if not %%A==ScriptHookVDotNet.dll (
- if not %%A==ScriptHookV.dll (
- if not %%A==dinput8.dll (
- call :ColorMsg 8A " -%%A"
- Echo.
- )
- )
- )
- )
- )
- )
- )
- )
- )
- )
- )
- )
- if exist !gtaBin!\scripts (
- set modActive=1
- if !asiCount! LSS 2 (
- Echo -One or more unknown mod scripts/DLLs:
- Echo -Script folder for .NET based mods:
- for /f %%A in ('dir /b "!gtaBin!\scripts\*.asi" 2^> nul') do (
- call :ColorMsg 8A " -%%A"
- Echo.
- )
- for /f %%A in ('dir /b "!gtaBin!\scripts\*.dll" 2^> nul') do (
- call :ColorMsg 8A " -%%A"
- Echo.
- )
- ) else (
- Echo -Script folder for .NET based mods:
- for /f %%A in ('dir /b "!gtaBin!\scripts\*.asi" 2^> nul') do (
- call :ColorMsg 8A " -%%A"
- Echo.
- )
- for /f %%A in ('dir /b "!gtaBin!\scripts\*.dll" 2^> nul') do (
- call :ColorMsg 8A " -%%A"
- Echo.
- )
- )
- )
- if !modActive!==0 (
- call :ColorMsg 8B " None."
- )
- Echo.
- Echo ----------
- call :ColorMsg 89 "Inactive mods:"
- if exist !modBin!\NativeTrainer.asi (
- call :ColorMsg 8E " -Native Trainer [NativeTrainer.asi]"
- Echo.
- set modInactive=1
- )
- if exist !modBin!\ScriptHookV.dll (
- call :ColorMsg 8E " -Script Hook V [ScriptHookV.dll]"
- Echo.
- set modInactive=1
- )
- if exist !modBin!\OpenIV.asi (
- call :ColorMsg 8E " -OpenIV ASI Loader [OpenIV.asi]"
- Echo.
- set modInactive=1
- )
- if exist !modBin!\ScriptHookVDotNet.asi (
- set modInactive=1
- if exist !modBin!\ScriptHookVDotNet.dll (
- call :ColorMsg 8E " -Script Hook V .NET [ScriptHookVDotNet.asi]"
- call :ColorMsg 8E " -Script Hook V .NET [ScriptHookVDotNet.dll]"
- Echo.
- ) else (
- call :ColorMsg 8B " -Script Hook V .NET [ScriptHookVDotNet.asi] "
- Echo.
- )
- ) else (
- if exist !modBin!\ScriptHookVDotNet.dll (
- set modInactive=1
- call :ColorMsg 8B " -Script Hook V .NET [ScriptHookVDotNet.dll]"
- Echo.
- )
- )
- if exist !modBin!\dinput8.dll (
- call :ColorMsg 8E " -ASI Loader [dinput8.dll]"
- Echo.
- set modInactive=1
- )
- if !ModAsiCount! GTR 1 (
- set modInactive=1
- Echo -One or more unknown mod scripts/DLLs:
- for /f %%A in ('dir /b "!modBin!\*.asi" 2^> nul') do (
- if not %%A==NativeTrainer.asi (
- if not %%A==ScriptHookVDotNet.asi (
- if not %%A==OpenIV.asi (
- call :ColorMsg 8E " -%%A"
- Echo.
- )
- )
- )
- )
- for /f %%A in ('dir /b "!modBin!\*.dll" 2^> nul') do (
- if not %%A==ScriptHookVDotNet.dll (
- if not %%A==ScriptHookV.dll (
- if not %%A==dinput8.dll (
- call :ColorMsg 8E " -%%A"
- Echo.
- )
- )
- )
- )
- )
- if exist !modBin!\scripts (
- set modInactive=1
- if !ModAsiCount! LSS 2 (
- Echo -One or more unknown mod scripts:
- Echo -Script folder for .NET based mods:
- for /f %%A in ('dir /b "!modBin!\scripts\*.asi" 2^> nul') do (
- call :ColorMsg 8E " -%%A"
- Echo.
- )
- for /f %%A in ('dir /b "!modBin!\scripts\*.dll" 2^> nul') do (
- call :ColorMsg 8E " -%%A"
- Echo.
- )
- ) else (
- Echo -Script folder for .NET based mods:
- for /f %%A in ('dir /b "!modBin!\scripts\*.asi" 2^> nul') do (
- call :ColorMsg 8E " -%%A"
- Echo.
- )
- for /f %%A in ('dir /b "!modBin!\scripts\*.dll" 2^> nul') do (
- call :ColorMsg 8E " -%%A"
- Echo.
- )
- )
- )
- if !modInactive!==0 (
- call :ColorMsg 8B " None."
- )
- Echo.
- Echo ----------
- if !single!==0 (
- if not !modInactive!==0 (
- call :ColorMsg 8A "Press 1 to enable all inactive mods."
- )
- if not !modActive!==0 (
- call :ColorMsg 8E "Press 2 to disable all active mods."
- )
- set actionPrompt=
- ) else (
- set actionPrompt=Disable/Enable mod
- )
- if !single!==0 (
- call :ColorMsg 8B "Press Z for single-mode"
- ) else (
- call :ColorMsg 8B "Press Z for multi-mode"
- )
- Echo Press X to exit
- if !force!==1 (
- Echo END
- endlocal
- exit /b
- )
- set /p action="!actionPrompt!>> "
- if !single!==1 (
- if /i not !action!==Z (
- if /i not !action!==X (
- call :CheckMod !action!
- )
- )
- ) else (
- if !action!==1 (
- if !modInactive! NEQ 0 (
- goto enable
- )
- )
- if !action!==2 (
- if !modActive! NEQ 0 (
- goto disable
- )
- )
- )
- if /i !action!==X (
- goto end
- )
- if /i !action!==Z (
- if !single!==0 (
- set single=1
- ) else (
- set single=0
- )
- )
- goto main
- :disable
- cls
- Echo Disabling mods...
- Echo .ASI files...
- for %%A in (!asiList!) do (
- move "!curDir!\!gtaBin!\%%A" "!curDir!\!modBin!" > nul
- if not exist "!curDir!\!modBin!\%%A" (
- call :ColorMsg 8C " ERROR: %%A could not be disabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8E " Disabled %%A"
- )
- )
- Echo.
- Echo .DLL files...
- for %%A in (!dllList!) do (
- move "!curDir!\!gtaBin!\%%A" "!curDir!\!modBin!" > nul
- call :ColorMsg 8E " Disabled %%A"
- )
- Echo.
- Echo Configuration/documentation files [.TXT, .INI, .CFG, .INF]...
- for %%A in (!txtList!) do (
- move "!curDir!\!gtaBin!\%%A" "!curDir!\!modBin!" > nul
- if not exist "!curDir!\!modBin!\%%A" (
- call :ColorMsg 8C " ERROR: %%A could not be disabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8E " Disabled %%A"
- )
- )
- Echo.
- if exist !gtaBin!\scripts (
- Echo .NET based scripts [scripts folder]...
- move "!curDir!\!gtaBin!\scripts" "!curDir!\!modBin!" > nul
- if not exist "!curDir!\!modBin!\scripts" (
- call :ColorMsg 8C " ERROR: .NET based scripts could not be disabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8E " Disabled .NET based scripts."
- )
- )
- Echo.
- timeout /t 2 > nul
- goto reset
- :enable
- cls
- for /f %%A in ('dir /b "!modBin!\*.*" 2^> nul') do (
- goto enable.cnt
- )
- call :ColorMsg 8C "No mods to enable."
- timeout /t 2 > nul
- goto reset
- :enable.cnt
- cls
- Echo Enabling mods...
- if exist !modBin!\*.asi (
- Echo .ASI files...
- for /f %%A in ('dir /b "!modBin!\*.asi" 2^> nul') do (
- move "!curDir!\!modBin!\%%A" "!curDir!\!gtaBin!" > nul
- if not exist "!curDir!\!gtaBin!\%%A" (
- call :ColorMsg 8C " ERROR: %%A could not be enabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8A " Enabled %%A"
- )
- )
- Echo.
- )
- if exist !modBin!\*.dll (
- Echo .DLL files...
- for /f %%A in ('dir /b "!modBin!\*.dll" 2^> nul') do (
- move "!curDir!\!modBin!\%%A" "!curDir!\!gtaBin!" > nul
- if not exist "!curDir!\!gtaBin!\%%A" (
- call :ColorMsg 8C " ERROR: %%A could not be enabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8A " Enabled %%A"
- )
- )
- Echo.
- )
- if exist !modBin!\*.txt (
- Echo Configuration/documentation files: .TXT
- for /f %%A in ('dir /b "!modBin!\*.txt" 2^> nul') do (
- move "!curDir!\!modBin!\%%A" "!curDir!\!gtaBin!" > nul
- if not exist "!curDir!\!gtaBin!\%%A" (
- call :ColorMsg 8C " ERROR: %%A could not be enabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8A " Enabled %%A"
- )
- )
- Echo.
- )
- if exist !modBin!\*.ini (
- Echo Configuration/documentation files: .INI
- for /f %%A in ('dir /b "!modBin!\*.ini" 2^> nul') do (
- move "!curDir!\!modBin!\%%A" "!curDir!\!gtaBin!" > nul
- if not exist "!curDir!\!gtaBin!\%%A" (
- call :ColorMsg 8C " ERROR: %%A could not be enabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8A " Enabled %%A"
- )
- )
- Echo.
- )
- if exist !modBin!\*.inf (
- Echo Configuration/documentation files: .INF
- for /f %%A in ('dir /b "!modBin!\*.inf" 2^> nul') do (
- move "!curDir!\!modBin!\%%A" "!curDir!\!gtaBin!" > nul
- if not exist "!curDir!\!gtaBin!\%%A" (
- call :ColorMsg 8C " ERROR: %%A could not be enabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8A " Enabled %%A"
- )
- )
- Echo.
- )
- if exist !modBin!\*.cfg (
- Echo Configuration/documentation files: .CFG
- for /f %%A in ('dir /b "!modBin!\*.cfg" 2^> nul') do (
- move "!curDir!\!modBin!\%%A" "!curDir!\!gtaBin!" > nul
- if not exist "!curDir!\!gtaBin!\%%A" (
- call :ColorMsg 8C " ERROR: %%A could not be enabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8A " Enabled %%A"
- )
- )
- Echo.
- )
- if exist !modBin!\scripts (
- Echo .NET based scripts [scripts folder]...
- move "!curDir!\!modBin!\scripts" "!curDir!\!gtaBin!" > nul
- if not exist "!curDir!\!gtaBin!\scripts" (
- call :ColorMsg 8C " ERROR: .NET based scripts could not be enabled."
- Echo Press any key to continue...
- pause > nul
- ) else (
- call :ColorMsg 8A " Enabled .NET based scripts."
- )
- )
- Echo.
- timeout /t 2 > nul
- goto reset
- :end
- endlocal
- if !dbg!==1 (
- exit /b
- )
- exit
- :: SUBROUTINES
- :ColorMsg
- <nul > X set /p ".=."
- set "param=^%~2" !
- set "param=!param:"=\"!"
- findstr /p /A:%1 "." "!param!\..\X" nul
- <nul set /p ".=%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%%DEL%"
- del /q X > nul
- Echo.
- exit /b
- :CheckMod
- set arg=%1
- if not exist "!curDir!\!gtaBin!\!arg!" (
- if not exist "!modBin!\!arg!" (
- Echo.
- call :ColorMsg 8C "No mod file called !arg!"
- timeout /t 2 > nul
- goto menu
- ) else (
- call :enableSingle !arg!
- )
- ) else (
- call :disableSingle !arg!
- )
- goto :eof
- :enableSingle
- set arg=%1
- move "!curDir!\!modBin!\!arg!" "!curDir!\!gtaBin!" > nul
- if not exist "!curDir!\!gtaBin!\!arg!" (
- call :ColorMsg 8C " ERROR: !arg! could not be enabled."
- Echo Press any key to continue...
- pause > nul
- goto menu
- ) else (
- call :ColorMsg 8A " Enabled !arg!"
- )
- timeout /t 2 > nul
- goto reset
- :disableSingle
- set arg=%1
- call :ProtectionTable !arg!
- if !break!==1 goto reset
- move "!curDir!\!gtaBin!\!arg!" "!curDir!\!modBin!" > nul
- if not exist "!curDir!\!modBin!\!arg!" (
- call :ColorMsg 8C " ERROR: !arg! could not be disabled."
- Echo Press any key to continue...
- pause > nul
- goto menu
- ) else (
- call :ColorMsg 8E " Disabled !arg!"
- )
- timeout /t 2 > nul
- goto reset
- :ProtectionTable
- set arg=%1
- for %%X in (!protected!) do (
- if /i !arg!==%%X (
- call :ColorMsg 8C "ERROR: !arg! could not be disabled due to game integrity protection"
- Echo.
- Echo Press any key to continue.
- pause > nul
- set break=1
- )
- )
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement