


you sure the errors aren't your fault?Namesis wrote: hi, i am searching fot the /showdmg src but i cant find it and the code of Jensen is wrongit gives some errors
can someone post me one good?
![]()
Code: Select all
(1:29:21 PM) C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Game.cpp(57691) : error C2039: 'm_iShowDamage' : is not a member of 'CClient'
C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Client.h(36) : see declaration of 'CClient'
C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Game.cpp(57693) : error C2039: 'm_iShowDamage' : is not a member of 'CClient'
C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Client.h(36) : see declaration of 'CClient' C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Game.cpp(57696) : error C2039: 'm_iShowDamage' : is not a member of 'CClient'
C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Client.h(36) : see declaration of 'CClient'
what i posted is exactly what was requested, the command, i didnt post anything needed to initalize vars, save to char files, actually display them etc... [/quote]Jensen wrote: if your error looks like this its your fault
<!--QuoteBegin-"jorge_mml@hotmail.com"+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE ("jorge_mml@hotmail.com")</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Code: Select all
(1:29:21 PM) C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Game.cpp(57691) : error C2039: 'm_iShowDamage' : is not a member of 'CClient' C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Client.h(36) : see declaration of 'CClient' C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Game.cpp(57693) : error C2039: 'm_iShowDamage' : is not a member of 'CClient' C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Client.h(36) : see declaration of 'CClient' C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Game.cpp(57696) : error C2039: 'm_iShowDamage' : is not a member of 'CClient' C:\Documents and Settings\Jorge Maldonado\Mis documentos\server\Nueva carpeta (7)\Client.h(36) : see declaration of 'CClient'
since you asked so nicely ill post a bit of it, but im going to repeat 1 more time, you will get an error like i just posted with what i put here, if you cant do something as simple as fix that error dont use these codesmolo wrote: btw... can you post /showdmg code for me?![]()
would be nice to share with people![]()
Code: Select all
if (memcmp(cp, "/showdmglog", 11) == 0) {
AdminOrder_ShowDamageLog(iClientH);
return;
}
if (memcmp(cp, "/showdmg", 8) == 0) {
AdminOrder_ShowDamage(iClientH);
return;
}
Code: Select all
void CGame::AdminOrder_ShowDamage(int iClientH)
{
char cStatMessage[80];
if (m_pClientList[iClientH] == NULL) return;
if(m_pClientList[iClientH]->m_iShowDamage == 1)
{
m_pClientList[iClientH]->m_iShowDamage = 0;
wsprintf(cStatMessage, "Command: ShowDamage Disabled");
}else{
m_pClientList[iClientH]->m_iShowDamage = 1;
wsprintf(cStatMessage, "Command: ShowDamage Enabled");
}
ShowClientMsg(iClientH, cStatMessage);
return;
}
and the function that uses those varibles
void CGame::AdminOrder_ShowDamageLog(int iClientH)
{
char cStatMessage[80];
if (m_pClientList[iClientH] == NULL) return;
if(m_pClientList[iClientH]->m_iShowDamage == 2)
{
m_pClientList[iClientH]->m_iShowDamage = 0;
wsprintf(cStatMessage, "Command: ShowDamageLog Disabled");
}else{
m_pClientList[iClientH]->m_iShowDamage = 2;
wsprintf(cStatMessage, "Command: ShowDamageLog Enabled");
}
ShowClientMsg(iClientH, cStatMessage);
return;
}
Code: Select all
void CGame::ShowClientDmg(int iClientH,char cTargetType, int iTargetH ,int iDamage){
char cInfoString[80];
if(cTargetType == DEF_OWNERTYPE_PLAYER){
ZeroMemory(cInfoString, sizeof(cInfoString));
wsprintf(cInfoString, "Player(%s) Level(%i) Damage(%i)",m_pClientList[iTargetH]->m_cCharName,
m_pClientList[iTargetH]->m_iLevel, iDamage);
}
if(cTargetType == DEF_OWNERTYPE_NPC){
ZeroMemory(cInfoString, sizeof(cInfoString));
wsprintf(cInfoString, "Npc(%s) Damage(%i)",m_pNpcList[iTargetH]->m_cNpcName, iDamage);
}
if( m_pClientList[iClientH]->m_iShowDamage == 1)
{
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cInfoString);
}else{
ShowClientMsg(iClientH, cInfoString);
}
return;
}