[CODE] GMs Online

It's a code to see all admin online.
Es un código para ver todos los admin en línea.

First | Primero
  • Go to Game.CPP
  • Once there, add:

Code: Select all

/*===========Get Admins==By Acidx====/admins=======*/[size=12][/size]
void CGame::PlayerCommandCheckAdmins(int iClientH)[size=12][/size]
{//An Acidx Production - Last Updated:Aug.29.2006[size=12][/size]
char  cNotifyMessage[256],cNotifyMessage2[256], cGMName[12];[size=12][/size]
int i,x;[size=12][/size]
WORD  * wp;[size=12][/size]
char  * cp;[size=12][/size]
char cBuff[256];[size=12][/size]
ZeroMemory(cNotifyMessage, sizeof(cNotifyMessage));[size=12][/size]
ZeroMemory(cNotifyMessage2, sizeof(cNotifyMessage2));[size=12][/size]
x = 0;[size=12][/size]
for (i = 0; i < DEF_MAXCLIENTS; i++) [size=12][/size]
 if (m_pClientList[i] != NULL) {[size=12][/size]
 if (m_pClientList[i]->m_iAdminUserLevel > 1) {[size=12][/size]
 wsprintf(cNotifyMessage, "Active Admin: %s", m_pClientList[i]->m_cCharName);[size=12][/size]
 ShowClientMsg(iClientH, cNotifyMessage);[size=12][/size]
 wsprintf(cNotifyMessage2, "%i Admins Are Online", x);[size=12][/size]
 ShowClientMsg(iClientH, cNotifyMessage2);[size=12][/size]
Next | Después
  • In Game.cpp
  • Go to "ChatMsgHandler()"
  • Add:

Code: Select all

/*====Add us Some /Commands here====*/[size=12][/size]
if (memcmp(cp, "/admins", 7) == 0) {[size=12][/size]
Last | Por último
  • And finally declare it in Game.h
  • Add:

Code: Select all

/*====Add us some Declares here pal===*/[size=12][/size]
void PlayerCommandCheckAdmins(int iClientH);
Krhiz. "[CODEE] Admins On-line." Warehousehb.2morpg.com. N.p., 08 Nov. 2014. Web. 30 May 2017. <http://warehousehb.2morpg.com/t109-code-admins-on-line>.
There is no greater education than one that is self-driven.

Who is online

Users browsing this forum: No registered users and 1 guest