Discord: https://discord.gg/z4rndWJzwq
 
HomeUseful information for Helbreath beginnersStatistics overviewSearchMemberlistGalleryRulesRegisterLog in

 

 [CODE] Admins on-line

Go down 
AuthorMessage
Krhiz


avatar

Silver 4
Earned by having 12 posts & comments.
10th Anniversary
Earned after being a member for 10 years.

Likes : 4

[CODE] Admins on-line Empty
#1PostSubject: [CODE] Admins on-line   [CODE] Admins on-line 9991011/8/2014, 6:10 am

Es un código para ver todos los admin en línea.

En Game.CPP agregar:

Code:
/*===========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]
cGMName[12];[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]
[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]
 x++;[size=12][/size]
}[size=12][/size]
}[size=12][/size]
 wsprintf(cNotifyMessage2, "%i Admins Are Online", x);[size=12][/size]
 ShowClientMsg(iClientH, cNotifyMessage2);[size=12][/size]
}[size=12][/size]

Dspues en Game.cpp en ChatMsgHandler() agregar:

Code:
/*====Add us Some /Commands here====*/[size=12][/size]
if (memcmp(cp, "/admins", 7) == 0) {[size=12][/size]
  PlayerCommandCheckAdmins(iClientH);[size=12][/size]
  return;[size=12][/size]
 }

Y por ultimo declararlo en Game.h agregar:

Code:
/*====Add us some Declares here pal===*/[size=12][/size]
void PlayerCommandCheckAdmins(int iClientH);
Back to top Go down
 
[CODE] Admins on-line
Back to top 
Page 1 of 1
 Similar topics
-
» Get IP code
» [CODE] MP,HP,SP, EN COLORES
» [CODE] /dkset
» [CODE] FPS Improvement
» [CODE] /createitem Amount

Permissions in this forum:You cannot reply to topics in this forum
JoinHelbreath.net :: Development :: Code Posting-
Jump to: