LCKB
echo all in source - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157)
+----- Forum: Ep4 Support (https://lckb.dev/forum/forumdisplay.php?fid=128)
+------ Forum: Solved topics (https://lckb.dev/forum/forumdisplay.php?fid=158)
+------ Thread: echo all in source (/showthread.php?tid=4524)

Pages: 1 2


- WorldOfWars - 01-13-2016


Hello,

 

i want to make an echo all in my sources, that when the function is called, the server make the equivalent of "echo all".

 

How can i make this?

 

thanks




- Agility - 01-13-2016


MsgrNoticeMsg

MsgrNoticeMsg(CNetMsg::SP& msg, int seq, int server, int subno, int zone, const char* chat)

Example:

 

strMessage= "Hello World!";

MsgrNoticeMsg(rmsg, -1, -1, -1, -1, strMessage);

 

this will send message for all players




- WorldOfWars - 01-13-2016


It doesn't work, so i tried with this code :

char strMessage[1024] = {0,};
sprintf(strMessage,"Hello World!");
CNetMsg::SP rmsg(new CNetMsg);
MsgrNoticeMsg(rmsg, -1, -1, -1 -1, strMessage);
GAMELOG << init("Info") << "Finish echo!" << delim << strMessage << end;
but still don't work




- Rafalom - 01-13-2016



It doesn't work, so i tried with this code :

char strMessage[1024] = {0,};
sprintf(strMessage,"Hello World!");
CNetMsg::SP rmsg(new CNetMsg);
MsgrNoticeMsg(rmsg, -1, -1, -1 -1, strMessage);
GAMELOG << init("Info") << "Finish echo!" << delim << strMessage << end;
but still don't work

 

MsgrNoticeMsg(rmsg, -1, -1, -1, -1, strMessage);

 

Missing a comma




- WorldOfWars - 01-13-2016

Where? i don't see it :angry: Huh




- Rafalom - 01-13-2016



It doesn't work, so i tried with this code :

char strMessage[1024] = {0,};
sprintf(strMessage,"Hello World!");
CNetMsg::SP rmsg(new CNetMsg);
MsgrNoticeMsg(rmsg, -1, -1, -1 -1, strMessage); <----------------------------<<
GAMELOG << init("Info") << "Finish echo!" << delim << strMessage << end;
but still don't work

 

In ur code post, here




- Agility - 01-13-2016



It doesn't work, so i tried with this code :

char strMessage[1024] = {0,};
sprintf(strMessage,"Hello World!");
CNetMsg::SP rmsg(new CNetMsg);
MsgrNoticeMsg(rmsg, -1, -1, -1 -1, strMessage);
GAMELOG << init("Info") << "Finish echo!" << delim << strMessage << end;
but still don't work

CLCString strMessage(100);
strMessage= "Hello World!";
CNetMsg::SP rmsg(new CNetMsg);
MsgrNoticeMsg(rmsg, -1, -1, -1, -1, strMessage);
SEND_Q(rmsg, ch->m_desc);
GAMELOG << init("Finish echo!") << end;



- WorldOfWars - 01-13-2016

It's doesn't work, it's strange.. I have it in gamelog but not IG




- Agility - 01-13-2016



CLCString strMessage(100);

strMessage= "Hello World!";

CNetMsg::SP rmsg(new CNetMsg);

MsgrNoticeMsg(rmsg, -1, -1, -1, -1, strMessage);

SEND_Q(rmsg, ch->m_desc);

GAMELOG << init("Finish echo!") << end;
 




- WorldOfWars - 01-14-2016

with this, the variable "ch" isn't declared :/