Join Helbreath
Would you like to react to this message? Create an account in a few clicks or log in to continue.

This is a website run by veteran Helbreath players with the aim of sharing discussions and content exclusively related to the development of a server and its gameplay.
HomeUseful information for Helbreath beginnersPlay, discover, and broadcast your Helbreath moments for free.Statistics overviewSearchMemberlistRulesRegisterLog in

We depend on Ads revenue to keep our site running. Please consider disabling your Ad Blocker so that we can continue to create the content you come to enjoy.
Thank you for your continued cooperation and understanding.


 [CODE] Admins on-line

Go down 


Posts : 18
Since : 2014-03-02

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

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

En Game.CPP agregar:

/*===========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]

Dspues en Game.cpp en ChatMsgHandler() agregar:

/*====Add us Some /Commands here====*/[size=12][/size]
if (memcmp(cp, "/admins", 7) == 0) {[size=12][/size]

Y por ultimo declararlo en Game.h agregar:

/*====Add us some Declares here pal===*/[size=12][/size]
void PlayerCommandCheckAdmins(int iClientH);

[CODE] Admins on-line 2mpymxj
Back to top Go down
[CODE] Admins on-line
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Join Helbreath :: Open Source / Development Corner :: C++-
Jump to: