- 28 Nis 2020
- 930
- 208
- 314
/clan
/ally
/kaptan
/party
/all
/shout
/merchant
/gm (GM oyun içi yazdığında mor renkte çıkan yazı gibi çıkar)
GameServerDlg.h Ekleyin
static ServerCommandTable s_commandTable;
altına ekle araya veya sona
ChatHandler.cpp Ekleyin
static Command<CGameServerDlg> commandTable[] =
{
altına
ve en alta inin bunlarıda ekleyin
/ally
/kaptan
/party
/all
/shout
/merchant
/gm (GM oyun içi yazdığında mor renkte çıkan yazı gibi çıkar)
GameServerDlg.h Ekleyin
Gizli metni görüntülemek için konuya cevap vermelisiniz.
Kod:
INLINE void SendNoticeClan(const char *msg, uint8 byNation = Nation::ALL)
{
SendChat<KNIGHTS_CHAT>(msg, byNation, true);
}
INLINE void SendNoticeAlly(const char *msg, uint8 byNation = Nation::ALL)
{
SendChat<ALLIANCE_CHAT>(msg, byNation, true);
}
INLINE void SendNoticeCommand(const char *msg, uint8 byNation = Nation::ALL)
{
SendChat<COMMAND_CHAT>(msg, byNation, true);
}
INLINE void SendNoticePart(const char *msg, uint8 byNation = Nation::ALL)
{
SendChat<PARTY_CHAT>(msg, byNation, true);
}
INLINE void SendNoticeAllChat(const char *msg, uint8 byNation = Nation::ALL)
{
SendChat<GENERAL_CHAT>(msg, byNation, true);
}
INLINE void SendNoticeShout(const char *msg, uint8 byNation = Nation::ALL)
{
SendChat<SHOUT_CHAT>(msg, byNation, true);
}
INLINE void SendNoticeMerchant(const char *msg, uint8 byNation = Nation::ALL)
{
SendChat<MERCHANT_CHAT>(msg,byNation, true);
}
INLINE void SendNoticeGMChat(const char *msg, uint8 byNation = Nation::ALL)
{
SendChat<GM_CHAT>(msg, byNation, true);
}
static ServerCommandTable s_commandTable;
altına ekle araya veya sona
Gizli metni görüntülemek için konuya cevap vermelisiniz.
Kod:
COMMAND_HANDLER(HandleClanCommand);
COMMAND_HANDLER(HandleAllyCommand);
COMMAND_HANDLER(HandleCapCommand);
COMMAND_HANDLER(HandlePartCommand);
COMMAND_HANDLER(HandleAllCommand);
COMMAND_HANDLER(HandleShoutCommand);
COMMAND_HANDLER(HandleMerchantCommand);
COMMAND_HANDLER(HandleGMCommand);
ChatHandler.cpp Ekleyin
static Command<CGameServerDlg> commandTable[] =
{
altına
Gizli metni görüntülemek için konuya cevap vermelisiniz.
Kod:
{ "clan", &CGameServerDlg::HandleClanCommand, "Sends a server-wide chat notice." },
{ "ally", &CGameServerDlg::HandleAllyCommand, "Sends a server-wide chat notice." },
{ "kaptan", &CGameServerDlg::HandleCapCommand, "Sends a server-wide chat notice." },
{ "party", &CGameServerDlg::HandlePartCommand, "Sends a server-wide chat notice." },
{ "all", &CGameServerDlg::HandleAllCommand, "Sends a server-wide chat notice." },
{ "shout", &CGameServerDlg::HandleShoutCommand, "Sends a server-wide chat notice." },
{ "merchant", &CGameServerDlg::HandleMerchantCommand, "Sends a server-wide chat notice." },
{ "gm", &CGameServerDlg::HandleGMCommand, "Sends a server-wide chat notice." },
ve en alta inin bunlarıda ekleyin
Gizli metni görüntülemek için konuya cevap vermelisiniz.
Kod:
COMMAND_HANDLER(CGameServerDlg::HandleClanCommand)
{
if (vargs.empty())
return true;
SendNoticeClan(args);
return true;
}
COMMAND_HANDLER(CGameServerDlg::HandleAllyCommand)
{
if (vargs.empty())
return true;
SendNoticeAlly(args);
return true;
}
COMMAND_HANDLER(CGameServerDlg::HandleCapCommand)
{
if (vargs.empty())
return true;
SendNoticeCommand(args);
return true;
}
COMMAND_HANDLER(CGameServerDlg::HandlePartCommand)
{
if (vargs.empty())
return true;
SendNoticePart(args);
return true;
}
COMMAND_HANDLER(CGameServerDlg::HandleAllCommand)
{
if (vargs.empty())
return true;
SendNoticeAllChat(args);
return true;
}
COMMAND_HANDLER(CGameServerDlg::HandleShoutCommand)
{
if (vargs.empty())
return true;
SendNoticeShout(args);
return true;
}
COMMAND_HANDLER(CGameServerDlg::HandleMerchantCommand)
{
if (vargs.empty())
return true;
SendNoticeMerchant(args);
return true;
}
COMMAND_HANDLER(CGameServerDlg::HandleGMCommand)
{
if (vargs.empty())
return true;
SendNoticeGMChat(args);
return true;
}