[Req] GuildMaster more than 1 Char
Code: Select all
void CGuild::UserCommand_AddGuildMaster(int iClientH, char * pData, DWORD dwMsgSize)
{
char seps[] = "= \t\n";
char * token, cTargetName[11], cBuff[256];
class CStrTok * pStrTok;
register int i, m_iGuildGUID;
if ( G_pGame->m_pClientList[ iClientH ] == NULL) return;
if ((dwMsgSize) <= 0) return;
if ( G_pGame->m_pClientList[ iClientH ]->m_iGuildRank != 0 ) {
G_pGame->SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_NOGUILDMASTERLEVEL, NULL, NULL, NULL, NULL);
return;
}
ZeroMemory(cTargetName, sizeof(cTargetName));
ZeroMemory(cBuff, sizeof(cBuff));
memcpy(cBuff, pData, dwMsgSize);
pStrTok = new class CStrTok(cBuff, seps);
token = pStrTok->pGet();
token = pStrTok->pGet();
if (token != NULL) {
if (strlen(token) > 10)
memcpy(cTargetName, token, 10);
else memcpy(cTargetName, token, strlen(token));
for (i = 1; i < DEF_MAXCLIENTS; i++)
if (( G_pGame->m_pClientList[ i ] != NULL) && (memcmp( G_pGame->m_pClientList[ i ]->m_cCharName, cTargetName, 10) == 0) ) {
if (memcmp( G_pGame->m_pClientList[ iClientH ]->m_cGuildName, G_pGame->m_pClientList[ i ]->m_cGuildName, 20) != 0) {
G_pGame->SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_CANNOTBANGUILDMAN, NULL, NULL, NULL, NULL);
delete pStrTok;
return;
}
G_pGame->bSendMsgToLS(MSGID_REQUEST_UPDATEGUILDINFO_DELGUILDSMAN, i);
SendGuildMsg(i, DEF_NOTIFY_DISMISSGUILDSMAN, NULL, NULL, NULL);
G_pGame->m_pClientList[ i ]->m_iGuildRank = 0;
G_pGame->SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUCCESSADDGM, NULL, NULL, NULL, NULL);
G_pGame->SendNotifyMsg(iClientH, i, DEF_COMMONTYPE_BANGUILD, NULL, NULL, NULL, NULL);
G_pGame->SendEventToNearClient_TypeA(i, DEF_OWNERTYPE_PLAYER, MSGID_EVENT_MOTION, DEF_OBJECTNULLACTION, NULL, NULL, NULL);
delete pStrTok;
return;
}
G_pGame->SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_PLAYERNOTONGAME, NULL, NULL, NULL, cTargetName);
}
delete pStrTok;
return;
}
based on ban guildsman, you should be able to finish it yourself.
<span style='color:green'>Danny says:u dont know how much u can make from weed ,make any item of clothing. im fucking serious, real good ropes!</span><br><br>Helbreath reborn, be there;)<br>owner of hbr.
i got 1 error :
just add the case ?
E:\HelBreath Resources\HG Sources\Game.cpp(36503) : error C2065: 'DEF_NOTIFY_SUCCESSADDGM' : undeclared identifier
Code: Select all
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUCCESSADDGM, NULL, NULL, NULL, NULL);
-.- its a send notify to client and then back to hg, so it requires a little bit of extra codingAce wrote: i got 1 error :E:\HelBreath Resources\HG Sources\Game.cpp(36503) : error C2065: 'DEF_NOTIFY_SUCCESSADDGM' : undeclared identifierjust add the case ?Code: Select all
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUCCESSADDGM, NULL, NULL, NULL, NULL);
undeclared identifier = you haven't defined it...Ace wrote: i got 1 error :E:\HelBreath Resources\HG Sources\Game.cpp(36503) : error C2065: 'DEF_NOTIFY_SUCCESSADDGM' : undeclared identifierjust add the case ?Code: Select all
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_SUCCESSADDGM, NULL, NULL, NULL, NULL);
You're trying to send DEF_NOTIFY_SUCCESSADDGM and it has no idea wtf you are on about.. Try definind it and you'll be fine.
<!--QuoteBegin-crazymnig88+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (crazymnig88)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->by notepad??? it didn't show any code, just show words wif no mean<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin-charlie+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (charlie)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->he'll probably save it as 600pagebook.bmp<br><br>400gb file plzkthnx<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
Ever looked at netmessages.h?
Just an excerpt..
It needs to be defined there, and also in the client.
Code: Select all
#define DEF_NOTIFY_NOTENOUGHGOLD 0x0B08
#define DEF_NOTIFY_KILLED 0x0B09
#define DEF_NOTIFY_EXP 0x0B0A
#define DEF_NOTIFY_GUILDDISBANDED 0x0B0B
#define DEF_NOTIFY_EVENTMSGSTRING 0x0B0C
#define DEF_NOTIFY_CANNOTJOINMOREGUILDSMAN 0x0B0D
#define DEF_NOTIFY_NEWGUILDSMAN 0x0B0E
#define DEF_NOTIFY_DISMISSGUILDSMAN 0x0B0F
#define DEF_NOTIFY_MAGICSTUDYSUCCESS 0x0B10
#define DEF_NOTIFY_MAGICSTUDYFAIL 0x0B11
#define DEF_NOTIFY_SKILLTRAINSUCCESS 0x0B12
#define DEF_NOTIFY_SKILLTRAINFAIL 0x0B13
#define DEF_NOTIFY_MP 0x0B14
It needs to be defined there, and also in the client.
<!--QuoteBegin-crazymnig88+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (crazymnig88)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->by notepad??? it didn't show any code, just show words wif no mean<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin-charlie+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (charlie)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->he'll probably save it as 600pagebook.bmp<br><br>400gb file plzkthnx<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->