Mauzen

SA-MP version switcher

Jan 19th, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @ECHO OFF
  2.  
  3. REM Really simple samp version switcher
  4. REM Realized purely in a batch script
  5. REM Mauzen, 1/19/2014
  6.  
  7. ECHO *************************************
  8. ECHO *  SA-MP Batch Version Switcher V1  *
  9. ECHO *   Created by Mauzen, 1/19/2014    *
  10. ECHO *************************************
  11. ECHO.
  12.  
  13. REM *** Store the current working directory ***
  14. SET CURDIR=%~dp0
  15.  
  16. IF "%1"=="" (
  17.     REM *** Get the current version ***
  18.     ECHO The currently active version is:
  19.     TYPE curversion.cfg
  20.     ECHO.
  21.     ECHO Available versions:
  22.     DIR /B /A:D
  23.     PAUSE
  24.     GOTO:EOF
  25. )
  26.  
  27.  
  28. REM *** Check if selected version is installed ***
  29. IF exist "%1" (
  30.     ECHO Switching to version "%1"
  31. ) ELSE (
  32.     ECHO Version "%1" is not installed.
  33.     GOTO:EOF
  34. )
  35.  
  36. REM *** Move version files to game directory ***
  37. XCOPY /E /Y %1\* ..
  38. ECHO.
  39. ECHO Successfully switched to version %1
  40.  
  41. REM *** Save active version to file for later use ***
  42. ECHO %1 > curversion.cfg
  43.  
  44. PAUSE
Advertisement
Add Comment
Please, Sign In to add comment