Autor Wiadomość
Nigga
PostWysłany: Wto 13:28, 25 Mar 2008    Temat postu: [CODE] /online

En Game.CPP
-----------



Kod:

void CGame::PlayerCommandCheckOnline(int iClientH)
{
char cNotifyMessage[256],cNotifyMessage2[256], cGMName
[12];
int i,x;
cGMName[12];
ZeroMemory(cNotifyMessage, sizeof(cNotifyMessage));
ZeroMemory(cNotifyMessage2, sizeof(cNotifyMessage2));
x = 0;
for (i = 0; i < DEF_MAXCLIENTS; i++)
if (m_pClientList[i] != NULL) {

if (m_pClientList[i]->m_iLevel > 1) {
wsprintf(cNotifyMessage, " %s", m_pClientList[i]->m_cCharName);
ShowClientMsg(iClientH, cNotifyMessage);
x++;
}
}
wsprintf(cNotifyMessage2, " %i Players", x);
ShowClientMsg(iClientH, cNotifyMessage2);
}





Buscar /who y abajo agregar:

Kod:


if (memcmp(cp, "/online", 6) == 0) {
            PlayerCommandCheckOnline(iClientH);
            return;
        }








Game.h, agregar:


Kod:
void PlayerCommandCheckOnline(int iClientH);

Powered by phpBB © 2001,2002 phpBB Group