Help to understand with a greeting

Results 1 to 2 of 2
  1. #1
    Proficient Member pravednik is offline
    MemberRank
    Feb 2014 Join Date
    179Posts

    sad 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
    MessageSendEx2(g_UserNotice, "%s", szTemp);



    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

    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); }



  2. #2

    Re: Help to understand with a greeting

    @RevolGaming @natzugen @DragonSeth maybe they can help.



Advertisement