Bom muitos tem a duvida de como fazer tutor falar em Laranja no game chat e help e GM,CM,GOd falar em Vermelho entao la vai o Tutorial
precisa editar os source assim.
Em chat.cpp procure por:
bool ChatChannel::talk
Nessa function ache:
if(it == m_users.end())return false;
Pule 2 linhas e bote isso:
SpeakClasses ntype = type;uint16_t channelId = getId();
if (channelId == 5) {
if (player->getGroupId() == 6) {
ntype = SPEAK_CHANNEL_RN;
}
else if(player->getGroupId() >= 2) {
ntype = SPEAK_CHANNEL_O;
}
}
Agora ache:
it->second->sendToChannel(player, type, text, m_id, _time);
Troque essa linha por:
it->second->sendToChannel(player, ntype, text, m_id, _time);
Bom Assim os Gods Falaram em Vermelho, e os game master , communyti managers e tutores falaram em laranja
Mais Akzs Como Fazer para que GODS , GMS e CMS falem em vermelho. Simples so Editar assim
SpeakClasses ntype = type;uint16_t channelId = getId();
if (channelId == 5) {
if (player->getGroupId() == 6) {
ntype = SPEAK_CHANNEL_RN;
}
else if (player->getGroupId() == 5) {
ntype = SPEAK_CHANNEL_RN;
}
else if (player->getGroupId() == 4) {
ntype = SPEAK_CHANNEL_RN;
}
else if(player->getGroupId() >= 2) {
ntype = SPEAK_CHANNEL_O;
}
}
Pronto Aperta F9 e Compila e estara pronto.
Como Editar os Groups ?
No Caso ali esta getGroupId no caso esta "5" Entao esta para acesso de CM Caso queria editar coloca o Valor do Access ali.(player->getGroupId() == 5)
OBS:o Ultimo Codigo Esse aki embaixo \/ Ele esta Para Todos Grupos
SpeakClasses ntype = type;uint16_t channelId = getId();
if (channelId == 5) {
if (player->getGroupId() == 6) {
ntype = SPEAK_CHANNEL_RN;
}
else if (player->getGroupId() == 5) {
ntype = SPEAK_CHANNEL_RN;
}
else if (player->getGroupId() == 4) {
ntype = SPEAK_CHANNEL_RN;
}
else if(player->getGroupId() >= 2) {
ntype = SPEAK_CHANNEL_O;
}
}