some text

Custom Server Name + GetMainInfo (Season 6 - 1.04e)

 Essa custom serve para você editar os nomes do Server e Salas do seu servidor sem a necessidade de editar o BMD do cliente. Lembrando que é para Season6 main 1.04e !

Source Main:

Protect.h

Código:

DWORD CustomServerNameEnable;
char ServerNameA[50];
char ServerNameB[50];
char ServerNameC[50];
char ServerNameD[50];
Main.cpp

Código:
//-> Custom Server Name
if(gProtect.m_MainInfo.CustomServerNameEnable == 1)
{
SetDword(0x00954148+1,(DWORD)gProtect.m_MainInfo.ServerNameA);
SetDword(0x00954115+1,(DWORD)gProtect.m_MainInfo.ServerNameB);
SetDword(0x009540E2+1,(DWORD)gProtect.m_MainInfo.ServerNameC);
SetDword(0x009540AC+1,(DWORD)gProtect.m_MainInfo.ServerNameD);
}

Source GetMainInfo:

struct MAIN_FILE_INFO

Código:
DWORD CustomServerNameEnable;
char ServerNameA[40];
char ServerNameB[40];
char ServerNameC[40];
char ServerNameD[40];
int _tmain(int argc,_TCHAR* argv[]) // OK

Código:
info.CustomServerNameEnable  = GetPrivateProfileInt("CustomServerName","CustomServerNameEnable",0,".\\Common\\CustomServerName.txt");

GetPrivateProfileString("CustomServerName","ServerNameA","",info.ServerNameA,sizeof(info.ServerNameA),".\\Common\\CustomServerName.txt");
GetPrivateProfileString("CustomServerName","ServerNameB","",info.ServerNameB,sizeof(info.ServerNameB),".\\Common\\CustomServerName.txt");
GetPrivateProfileString("CustomServerName","ServerNameC","",info.ServerNameC,sizeof(info.ServerNameC),".\\Common\\CustomServerName.txt");
GetPrivateProfileString("CustomServerName","ServerNameD","",info.ServerNameD,sizeof(info.ServerNameD),".\\Common\\CustomServerName.txt");

Configuration File in MainInfo

Código PHP:
//==============================================
//- Custom Server Name - By Emershow
//==============================================
//- ServerCode list to Use:
//- ServerNameA = 0, 1, 2, 2, 4
//- ServerNameB = 5
//- ServerNameC = 6, 7
//- ServerNameD = 8, 9, 10, 11
//==============================================
[CustomServerName]
CustomServerNameEnable 1
ServerNameA 
Servidor Principal (Com PVP)
ServerNameB Servidor Iniciante (Sem PVP)
ServerNameC Servidor Vip (Sem PVP)
ServerNameD Servidor de Testes 

Nenhum comentário:

Anterior Proxima Página inicial