Lib_Network, Find: s_CFieldServerMsg.cpp
in s_CFieldServerMsg.cpp, Find: if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f)
It will look like this
C++:
if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f)
{
if (pGLChar->m_lnMoney != 0)
{
CConsoleMessage::GetInstance()->Write(_T("#### ERROR:Money is not correct. Name %s Money %I64d ####"), pGLChar->m_szName, pGLChar->m_lnMoney);
pGLChar->m_lnMoney = 0;
}
}
Now, to add the welcome message, add the entire code INSIDE the " if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f) " condition. So it will look like this.
C++:
if (pGLChar->m_wLevel == 1 && pGLChar->m_vSavePos.x == 0.0f && pGLChar->m_vSavePos.z == 0.0f)
{
// Author: Jeey
// Description: Welcome Announcement
// Date: 23/06/10
CString strMessage;
GLMSG::SNET_SERVER_GENERALCHAT netmsgchat;
strMessage.Format("Welcome Character:%s(s) to '%s'. Thank you for joining our server, have fun!", pGLChar->m_szName, GLCONST_CHAR::strSCHOOLNAME[pGLChar->m_wSchool].c_str(), RANPARAM::ClientWindowTitle);
netmsgchat.SETTEXT(strMessage.GetString());
netmsgchat.bNotify = true;
netmsgchat.iColor = 6;
SendAllClient(&netmsgchat);
if (pGLChar->m_lnMoney != 0)
{
CConsoleMessage::GetInstance()->Write(_T("#### ERROR:Money is not correct. Name %s Money %I64d ####"), pGLChar->m_szName, pGLChar->m_lnMoney);
pGLChar->m_lnMoney = 0;
}
}
View attachment 254765