Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO1 Modding Support & Discussion
  3. BO1 auto restarter

BO1 auto restarter

Scheduled Pinned Locked Moved BO1 Modding Support & Discussion
3 Posts 2 Posters 159 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Decundefined Offline
    Decundefined Offline
    Dec Contributor
    wrote on last edited by
    #1

    so this does the job for restarting my bo1 server since the session modify error hasnt been fixed, would there be anyway for me to get how many players are on the server currently in a bat file?

    Echo on
    :serverstart
    cls
    start C:\Users\Weedliketoosmoke\Desktop\plutonium-bo2-server!start_zm_server.bat
    timeout /t 10
    call getCmdPID
    set "current_pid=%errorlevel%"
    for /f "skip=3 tokens=2 delims= " %%a in ('tasklist /fi "imagename eq cmd.exe"') do (
    if "%%a" neq "%current_pid%" (
    TASKKILL /PID %%a /f >nul 2>nul
    )
    )
    for /f "skip=3 tokens=2 delims= " %%a in ('tasklist /fi "imagename eq plutonium-bootstrapper-win32.exe"') do (
    if "%%a" neq "%current_pid%" (
    TASKKILL /PID %%a /f >nul 2>nul
    )
    )
    goto serverstart

    1 Reply Last reply
    0
    • alnoiseundefined Offline
      alnoiseundefined Offline
      alnoise
      wrote on last edited by
      #2

      Gonna give this a little bump since it would be incredibly useful..

      Or in other words,
      Same.

      Decundefined 1 Reply Last reply
      1
      • Decundefined Offline
        Decundefined Offline
        Dec Contributor
        replied to alnoise on last edited by
        #3

        alnoise u need GetCmdPID.exe for it to work put it in the same directory as the bat

        1 Reply Last reply
        0

        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Donate