Autor Wiadomość
Nigga
PostWysłany: Wto 14:28, 18 Mar 2008    Temat postu: [CODE] /who

/who * Ares | * Elvine | * Traveller




buscamos:
Kod:



if (memcmp(cp, "/who", 4) == 0) {
if (m_pClientList[iClientH]->m_iAdminUserLevel >= m_iAdminLevelWho) {
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_TOTALUSERS, NULL, NULL, NULL, NULL);
}
return;






reemplazamos por:
Kod:


if (memcmp(cp, "/who", 4) == 0) {
char cMsg[120];
int i, iAres = 0, iElv = 0, itra = 0;
for (i = 0; i < DEF_MAXCLIENTS; i++){
if (m_pClientList[i] != NULL) {
if (memcmp(m_pClientList[i]->m_cLocation, "are", 1) == 0 ) iAres++;
else if (memcmp(m_pClientList[i]->m_cLocation, "elv", 2) == 0 ) iElv++;
else if (memcmp(m_pClientList[iClientH]->m_cLocation, "NONE", 3) == 0 ) itra++;
}
}
ZeroMemory(cMsg, sizeof(cMsg));
wsprintf(cMsg, "Ares: %d | Elv: %d | Trav: %d", iAres, iElv, itra);
         
ShowClientMsg(iClientH, cMsg);
return;
}

Powered by phpBB © 2001,2002 phpBB Group