Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Re: MaxGameInstances v1 - Limit main.exe  (Visto 1293 veces)

0 Miembros and 2 Guests are viewing this topic.

Offline Keko Posteado: May 14, 2021, 11:40:11 PM | Modificado: May 15, 2021, 12:52:07 AM by Keko

  • 0 puntos por ventas
  • *
  • Rank: Heroe
  • Posts: 171
  • Gracias recibida: 258
  • ar
Borrar comentario por favor


Offline showmax #1 Posteado: May 15, 2021, 09:43:56 AM | Modificado: November 02, 2021, 02:20:56 AM by ZabiinoOo

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 10
  • Gracias recibida: 4416
  • vn
Code: [Select]
#include <windows.h>
#include <tlhelp32.h>
#include <tchar.h>

int gMaxGameInstances = 20;
bool IsProcessRunning(const char *ProcessName, int maxProcess)
{
   PROCESSENTRY32 pe32 = {sizeof(PROCESSENTRY32)};
   HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
   int Temp = 0;
   if (Process32First(hSnapshot, &pe32))
   {
      do
      {
         if (_tcsicmp(pe32.szExeFile, ProcessName) == 0)
         {
            Temp++;
            //gLog.Output(LOG_DEBUG, "CheckMaxGameInstances: %d: %d", Temp, maxProcess);
            if (Temp > maxProcess)
            {
               CloseHandle(hSnapshot);
               return true;
            }
         }
      } while (Process32Next(hSnapshot, &pe32));
   }

   CloseHandle(hSnapshot);
   return false;
}
void CheckMaxGameInstances() // OK
{
   if (gMaxGameInstances == 0)
   {
      return;
   }

   if (IsProcessRunning("main.exe", gMaxGameInstances))
   {
      //gLog.Output(LOG_DEBUG, "CheckMaxGameInstances: SafeExitProcess");
      ExitProcess(1);
   }
}


Copy to main


Offline alfarraptor #2 Posteado: August 01, 2022, 01:30:09 PM

  • ESTAFADOR
  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 9
  • Gracias recibida: 151
  • ar
Mis 2 centavos:

La forma correcta de hacer esto es la siguiente:

Utilizas GetModuleFileName para obtener el nombre del proceso del juego y su directorio.
Escanea los procesos como lo estas haciendo y luego cuentas cuantos procesos tienen el nombre y directorio de tu cliente.
Haces el conteo y luego si supera el número, lo cierras ^^

Esa es la mejor manera de hacerlo ya que la forma expuesta en este post no sirve porque podría abrir otro MU de otro servidor y lo tomaría incorrectamente porque no comprueba el directorio del proceso, entonces comparando el directorio del proceso del juego se solucionaría el problema :D
SOS tan basico que no tenes logica para pensar que el usuario puede copiar el cliente entero en otra carpeta, y ya, bypaseado tu metodo de leer el directorio....
De nada sirve hacer estos chequeos lado cliente ya que hay mil maneras de bypasearlo, hay que hacerlo lado servidor con la conexion entrante.


Offline jacobhue #3 Posteado: August 03, 2022, 01:22:15 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 2
  • in
Su escritura es realmente informativa, especialmente porque es muy significativa y actualizada. ¡Gracias por compartir esta maravillosa publicación!

Tu escritura es realmente genial. Estoy tan contento de haberlo leído. Me mantuvo enganchado todo el camino.

Gracias por esta información. Realmente aprecio la información que ha proporcionado.https://www.imybkexperience.com/ https://www.mykfc-experience.com/ https://www.mybpcreditcard.one/


Offline weejayrane #4 Posteado: February 06, 2023, 04:57:51 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
  • uy
This is extremely useful! I appreciate you sharing these concepts!
balenaetcher website


Offline weejayrane #5 Posteado: February 06, 2023, 04:59:45 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
  • uy
NOT WORKING USING FOX UPDATE 19  ARCEUS X website


Offline weejayrane #6 Posteado: April 25, 2023, 07:48:10 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
  • uy
The most reliable Spotify version for your country or device can be downloaded with the help of xmanager for Spotify Apk. There are accessible adaptations of Spotify in this administrator apparatus.

ostora tv stands out from other streaming apps by offering an impressive number of features. Here are a portion of the key elements that Ostora television offers:


Offline weejayrane #7 Posteado: April 25, 2023, 08:02:22 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
  • uy
An alternative app store is aurora store . This is the same app; you don't need a Google Play account to download the APK offer from Google Play.

Horizon is another open source Nintendo Switch emulator that sudden spikes in demand for ARMv8 Android gadgets. You can play hundreds of games for the Nintendo Switch with skyline emulator apk

You may be familiar with the FFH4X apk. This application might be recognizable to numerous Garena Free Fire players. As a general rule, this program is famous among gamers since it permits them to win with negligible exertion. ffh4x apk

etcher download  vows to perfectly consume working framework pictures to SD cards and convenient media in only three stages

krnl is one of the most solid Roblox agents available concerning script execution. Krnl is a very reliable, stable, and rarely crashes executor.






Offline Todayquordlehint #8 Posteado: July 07, 2023, 12:20:19 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
  • pk
Quordle has been available for purchase for a span of five months. Its successful outcome is the result of being released as an incomplete product. The daily game mode presents a fresh set of words for the Quordle puzzle every day at the stroke of midnight.
<a href='https://quordlehint.com/'target='_parent'>Today Quordle hint </a>


Offline ErealistNetWorth #9 Posteado: September 10, 2024, 02:24:55 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
  • us
Erealist Net Worth refers to the estimated financial value of Erealist, a platform that specializes in providing innovative solutions for real estate professionals by leveraging advanced technology and data analytics. As an entity operating within the dynamic realm of digital real estate tools, Erealist has garnered attention for its potential profitability and market impact.
https://networthgala.com/erealist-net-worth/


Offline ErealistNetWorth #10 Posteado: September 10, 2024, 02:28:55 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
  • us
Erealist Net Worth refers to the estimated financial value of Erealist, a platform that specializes in providing innovative solutions for real estate professionals by leveraging advanced technology and data analytics.
https://networthgala.com/erealist-net-worth/


Offline Drugdle #11 Posteado: September 10, 2024, 02:48:45 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
  • us
Drugdle transforms every guess into an electrifying experience—each attempt igniting excitement as you inch closer to victory! Whether you're honing your language skills or simply seeking some competitive edge among pals, Drugdle promises endless hours of entertainment filled with curious discoveries and unexpected twists around every corner!

https://nytwordle.today/drugdle/


Offline ImmaculateGrid #12 Posteado: September 25, 2024, 09:05:22 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
Immaculate Grid Game involves guessing words based on clues given in a grid format, adding an element of challenge and excitement to each round. Players have to use their wit and creativity to decipher the hidden words within the grid. https://immaculategrid.cc/



Offline ImmaculateGrid #13 Posteado: September 25, 2024, 09:08:59 PM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
Immaculate Grid Game involves guessing words based on clues given in a grid format, adding an element of challenge and excitement to each round. Players have to use their wit and creativity to decipher the hidden words within the grid. https://immaculategrid.cc/


Offline QuordleToday #14 Posteado: October 12, 2024, 05:32:15 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
Quordle Today is a word puzzle game that challenges players to guess four five-letter words within six attempts. The addictive nature of Quordle lies in its simplicity yet complexity. Players must use logic, deduction, and vocabulary skills to crack the code and unravel the hidden words.
https://quordle-today.com/


Offline TaurusG3CProblems #15 Posteado: October 23, 2024, 03:44:05 AM

  • 0 puntos por ventas
  • *
  • Rank: Principiante
  • Posts: 0
  • Gracias recibida: 0
  • us
Taurus G3C Problems fro occurs due to debris or dirt obstructing the movement of the slide. Another cause could be weak recoil springs, which might need to be replaced. Additionally, an improperly lubricated gun could also contribute to this issue. https://gunexpertise.com/taurus-g3c-problems/


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate