Ei bine am venit eu cu solutia iar solutia se numeste ImpersonateChat
Ce stie sa faca ? poti prin comanda
/gm_say <numele jucatorului/mob> <culoare> urmat de textul tauPentru probleme comentati sau add pe discord, nu am testat mult comanda asta , am facut-o pentru amuzament.
*Poze / Video (obligatoriu):
![[C++] ImpersonateChat - Mesaj 1 - Imagine 1 [C++] ImpersonateChat - Mesaj 1 - Imagine 1](https://i.imgur.com/N7vc4mu.png)
![[C++] ImpersonateChat - Mesaj 1 - Imagine 2 [C++] ImpersonateChat - Mesaj 1 - Imagine 2](https://i.imgur.com/OCWcRbg.png)
![[C++] ImpersonateChat - Mesaj 1 - Imagine 3 [C++] ImpersonateChat - Mesaj 1 - Imagine 3](https://i.imgur.com/aYp9Qh2.png)
Am observat ca in chatul playerului aparea dublu text
![[C++] ImpersonateChat - Mesaj 1 - Imagine 4 [C++] ImpersonateChat - Mesaj 1 - Imagine 4](https://i.imgur.com/b4FATwS.png)
Asa ca intrati in cmd_troll.cpp si schimbati tot
static void SendChatAs(LPCHARACTER from, BYTE type, const char* msg)static void SendChatAs(LPCHARACTER from, BYTE type, const char* msg)
{
if (!from || !msg) return;
size_t len = strnlen(msg, CHAT_MAX_LEN);
if (len > CHAT_MAX_LEN) len = CHAT_MAX_LEN;
TPacketGCChat p{ HEADER_GC_CHAT,
static_cast<WORD>(sizeof(TPacketGCChat) + (int)len + 1),
type,
from->GetVID() };
TEMP_BUFFER buf;
buf.write(&p, sizeof(p));
buf.write(msg, (int)len + 1);
if (LPSECTREE tree = from->GetSectree())
{
struct FSend {
const void* data; int size;
void operator()(LPENTITY ent) const {
if (!ent->IsType(ENTITY_CHARACTER)) return;
if (LPDESC d = static_cast<LPCHARACTER>(ent)->GetDesc())
d->Packet(data, size);
}
} f{ buf.read_peek(), (int)buf.size() };
tree->ForEachAround(f);
}
}
la acest mesaj și conținutul se va afișa automat.





