Help to understand with a greeting
Hello dear friends !
Please help solve the problem.
found the code for the personalized greeting for the server zTeam but I have a problem with one line
Quote:
MessageSendEx2(g_UserNotice, "%s", szTemp);
http://www.imageup.ru/img17/2900632/...9_10-56-54.png
here is the code what I found
just look in user.cpp for
Code:
if ( (lpMsg->CtlCode & 0x20 ) == 0x20 ) { lpObj->Authority = 0x20;
LogAddC(2, "(%s)(%s) Set Event GM", lpObj->AccountID, lpObj->Name);
cManager.ManagerAdd(lpObj->Name, lpObj->m_Index); //Season 2.5 add-on
gObjAddBuffEffect(lpObj, AT_GAMEMASTER_LOGO, 0, 0, 0, 0, -10);
char szTemp[128];
sprintf(szTemp, "GameMaster %s is now online!", lpObj->Name);
AllSendServerMsg(szTemp);
}
and below it add
Code:
if ((lpMsg->CtlCode & 0x00) == 0x00) {
char szTemp[128];
sprintf(szTemp, "User %s has logged in!", lpObj->Name);
MessageSendEx2(g_UserNotice, "%s", szTemp); }
and in that same .cpp search for
Code:
void gObjSetBP(int aIndex)
and add above it
Quote:
void MessageSendEx2(int Type, char * Message, ...)
{
char szTemp[1024];
va_list pArguments;
va_start(pArguments, Message);
vsprintf(szTemp, Message, pArguments);
va_end(pArguments);
// ----
CHAT_WHISPER_EX pMessage;
memcpy(pMessage.Message, szTemp, 90);
pMessage.Type = Type;
pMessage.Head.set((LPBYTE)&pMessage, 2, sizeof(CHAT_WHISPER_EX));
DataSendAll((LPBYTE)&pMessage, pMessage.Head.size); }
Re: Help to understand with a greeting