Jump to content

Forçar Nome De Executavel


tierrilopes
 Share

Recommended Posts

Serve para que o cliente fechar-se caso não possua o nome pré-definido.

Exemplo: O nome pré-definido é "Blabla.exe", se o executável do cliente for Blabla.exe então irá abrir.

Caso o nome seja diferente, por exemplo BlaBla1.exe, o cliente irá fechar-se.

 

Ir até ao ficheiro game/src/input.cpp

 

Procurar por:

void CInputProcessor::Version(LPCHARACTER ch, const char* c_pData){
  if (!ch)
      return;

TPacketCGClientVersion * p = (TPacketCGClientVersion *) c_pData;

 

Adicionar isto debaixo:

if( (strcmp(p->filename,"Blabla.exe")) ){

  ch->ChatPacket(CHAT_TYPE_NOTICE, "Nome modificado.");
  ch->GetDesc()->DelayedDisconnect(3);
  return;
}

 

Onde Blabla.exe = nome e extensão do ficheiro.

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...