else
{
strName += " [ViP Head GM]";
}
// 명성에 따른 색표시.#if __VER >= 13 // __HONORABLE_TITLE
if( IsChaotic() )
dwColor = prj.m_PKSetting.dwChaoColor;
else if( IsPKPink() )
dwColor = prj.m_PKSetting.dwReadyColor;
else if( m_dwAuthorization >= AUTH_ADMINISTRATOR ) // GM / Admin colors
dwColor = 0xff99CCFF;
else if( m_dwAuthorization >= AUTH_GAMEMASTER3 )
dwColor = 0xffFFFF00;
else if( m_dwAuthorization >= AUTH_GAMEMASTER2 )
dwColor = 0xffFFFF00;
else
dwColor = prj.m_PKSetting.dwGeneralColor;
CString strFameName = GetTitle();
if( strFameName.IsEmpty() == FALSE )
{
CString strName;
strName = "]";
strName += strFameName;
strName += "[ ";
strName += m_szName;
strcpy( szName, (LPCTSTR)strName );
}
// GM / Admin tag
if(m_dwAuthorization >= AUTH_GAMEMASTER3)
{
CString strName;
strName = szName;
if(m_dwAuthorization >= AUTH_ADMINISTRATOR)
{
strName += " [ViP Owner]";
}
else
{
strName += " [ViP Developer]";
}
strcpy( szName, (LPCTSTR)strName );
}
#else
#ifndef __AUTHORIZATION_H#define __AUTHORIZATION_H
// AUTHORAZATION 정의들. ADMINISTRATOR에 가까울 수룩 수퍼 계정이다.
#define AUTH_OBSERVER 'D' // 관찰자 계정 ; 방송용, 모니터링, 감시용
#define AUTH_GENERAL 'F' // 일반 사용자 유저
#define AUTH_LOGCHATTING 'G' // 채팅로그를 남길 일반유저
#define AUTH_JOURNALIST 'H' // Youtubers - Gives ViP YouTube Tag
#define AUTH_HELPER 'J' // MODERATOR/ViP Helper - Gives ViP Helper Tag
#define AUTH_GAMEMASTER 'L' // NORMAL GM - RESTRICTED POWERS - Gives ViP GM Tag
#define AUTH_GAMEMASTER2 'M' // HEAD GM - HAS ADMIN POWERS - Gives ViP Head GM Tag
#define AUTH_GAMEMASTER3 'N' // ADMIN POWERS - USED FOR DEVELOPER - Gives ViP Developer Tag
#define AUTH_OPERATOR 'O' // System Operator - Not used**
#define AUTH_ADMINISTRATOR 'P' // VIP OWNER - FULL COMMANDS - GIVES ViP Owner Tag
//GM /ADMIN TAG
if(m_dwAuthorization >= AUTH_GAMEMASTER)
{
CString strName;
strName = szName;
if(m_dwAuthorization == AUTH_ADMINISTRATOR)
{
strName += " [VIP Owner]";
}
else if(m_dwAuthorization >= AUTH_GAMEMASTER2 && m_dwAuthorization < AUTH_GAMEMASTER3)
{
strName = " [VIP Developer]"
}
else
{
//ETCETERA
}
}
else if(m_dwAuthorization >= AUTH_GAMEMASTER2 && m_dwAuthorization < AUTH_GAMEMASTER3)
else if(m_dwAuthorization >= AUTH_GAMEMASTER3 && m_dwAuthorization < AUTH_GAMEMASTER4)
Thank you so much Raventh! Top Lad!
Code:else if(m_dwAuthorization >= AUTH_GAMEMASTER2 && m_dwAuthorization < AUTH_GAMEMASTER3
if (m_dwAuthorization > AUTH_GENERAL)
{
//Admin is defined as P, you're using Z. This will make it show till max Auth
if (m_dwAuthorization >= AUTH_ADMINISTRATOR)
{
strName += " [Admin]";
}
//This setting GM2, GM3 and Operator to the same title.
else if (m_dwAuthorization >= AUTH_GAMEMASTER2)
{
strName += " [Game Master]";
}
//Any Auth above AUTH_GENERAL will be set to this besides the ones above.
else{ strName += " [Staff]"; }
}
if (m_dwAuthorization >= AUTH_ADMINISTRATOR)
{
dwColor = 0xFF99CCfF;
strName += " [Admin]";
}
switch (m_dwAuthorization)
{
case AUTH_GAMEMASTER:
case AUTH_GAMEMASTER2:
dwColor = 0xff99CCFF;
strName += " [ViP Staff]";
break;
}
//Initialize cString first and set it to player name
CString strName;
strName = szName;
if (IsChaotic()){ dwColor = prj.m_PKSetting.dwChaoColor; }
else if (IsPKPink()){ dwColor = prj.m_PKSetting.dwReadyColor; }
else if (m_dwAuthorization > AUTH_GENERAL)
{
switch (m_dwAuthorization)
{
case AUTH_GAMEMASTER:
case AUTH_GAMEMASTER2:
dwColor = 0xff99CCFF;
strName += " [ViP Staff]";
break;
case AUTH_GAMEMASTER3:
dwColor = 0xff99CCFF;
strName += " [ViP GameMaster]";
break;
case AUTH_OPERATOR:
dwColor = 0xff99CCFF;
strName += " [ViP Head GM]";
break;
case AUTH_ADMINISTRATOR:
dwColor = 0xff99CCFF;
strName += " [ViP Admin]";
break;
}
}
CString strFameName = GetTitle();
if (!strFameName.IsEmpty())
{
strName.Insert(0, CString("[" + strFameName + "] "));
}
strcpy(szName, (LPCSTR)strName);
Well, looking at the defines, this is not needed. if (auth >= 'M' and auth is less than 'N') meaning it will always be 'M'. So, if (m_dwAuthorization == AUTH_GAMEMASTER2)
Code:if (m_dwAuthorization > AUTH_GENERAL) { //Admin is defined as P, you're using Z. This will make it show till max Auth if (m_dwAuthorization >= AUTH_ADMINISTRATOR) { strName += " [Admin]"; } //This setting GM2, GM3 and Operator to the same title. else if (m_dwAuthorization >= AUTH_GAMEMASTER2) { strName += " [Game Master]"; } //Any Auth above AUTH_GENERAL will be set to this besides the ones above. else{ strName += " [Staff]"; } }
Also, you could just do both the names and the colors at once.
Code:if (m_dwAuthorization >= AUTH_ADMINISTRATOR) { dwColor = 0xFF99CCfF; strName += " [Admin]"; }
You could use a switch statement if you want like this. However, without having a check above AUTH_ADMINISTRATOR (defined as P) and if your character is set to 'Z', you will appear as a normal player.
Code:switch (m_dwAuthorization) { case AUTH_GAMEMASTER: case AUTH_GAMEMASTER2: dwColor = 0xff99CCFF; strName += " [ViP Staff]"; break; }
But, doing the names and the colors at one place (if they are before the honor titles) the name will be over-written.
Code://Initialize cString first and set it to player name CString strName; strName = szName; if (IsChaotic()){ dwColor = prj.m_PKSetting.dwChaoColor; } else if (IsPKPink()){ dwColor = prj.m_PKSetting.dwReadyColor; } else if (m_dwAuthorization > AUTH_GENERAL) { switch (m_dwAuthorization) { case AUTH_GAMEMASTER: case AUTH_GAMEMASTER2: dwColor = 0xff99CCFF; strName += " [ViP Staff]"; break; case AUTH_GAMEMASTER3: dwColor = 0xff99CCFF; strName += " [ViP GameMaster]"; break; case AUTH_OPERATOR: dwColor = 0xff99CCFF; strName += " [ViP Head GM]"; break; case AUTH_ADMINISTRATOR: dwColor = 0xff99CCFF; strName += " [ViP Admin]"; break; } } CString strFameName = GetTitle(); if (!strFameName.IsEmpty()) { strName.Insert(0, CString("[" + strFameName + "] ")); } strcpy(szName, (LPCSTR)strName);