*Problemă:Chat GM
Tipologie server:PVM
*Resursă folosită:-
*ServerFiles utilizat:-
*Syserr:-
Poză:h t t p s: //im gur. c o m/a/P3qcrHT - FACETI VOI LINK-ul ca nu am 15 mesaje
*Detalii suplimentare:Deci cand scriu /n si ceva , imi baga numele meu de doua ori , asa ca in poza
Problema Chat GM
- șumahăr
-

- Mesaje: 701
- Membru din: 29 Iun 2018, 13:50
- Aprecieri: 187
- Mulţumiri: 2319
- Discord: Copiază ID
1.Extragem root.eix/.epk
2.Intram în uichat.py de preferabil cu notepad++
3.Cautam la inceput:
Inlocuim cu
2.Intram în uichat.py de preferabil cu notepad++
3.Cautam la inceput:
import player2.Căutăm:
def __SendTalkingChatPacket(self, text):
characterName = player.GetName()
if text[0] == '/' and text[1] == 'n' and text[2] == ' ':
newtext = text.split(' ', 1)
net.SendChatPacket(newtext[0] + " " + player.GetName() + ": " + newtext[1], chat.CHAT_TYPE_TALKING)
self.__ResetChat()
else:
self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING)
self.__ResetChat()
Inlocuim cu
def __SendTalkingChatPacket(self, text):
self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING)
self.__ResetChat()Du-te in sursa game,cauta cmd_gm.cpp si deschide-l.
Cauta:
ACMD(do_notice)
{
.
.
.
}
Inlocuieste toata functia cu :
ACMD(do_notice)
{
char chatbuf[CHAT_MAX_LEN + 1];
snprintf(chatbuf, sizeof(chatbuf), "%s :%s", ch->GetName(), argument);
BroadcastNotice(chatbuf);
}
Cauta:
ACMD(do_notice)
{
.
.
.
}
Inlocuieste toata functia cu :
ACMD(do_notice)
{
char chatbuf[CHAT_MAX_LEN + 1];
snprintf(chatbuf, sizeof(chatbuf), "%s :%s", ch->GetName(), argument);
BroadcastNotice(chatbuf);
}
Am rezolvat acum pe /n Merge apare bine problema e pe ca apare numele si pe /NKravyus. scrie:1.Extragem root.eix/.epk
2.Intram în uichat.py de preferabil cu notepad++
3.Cautam la inceput:
import player2.Căutăm:
def __SendTalkingChatPacket(self, text): characterName = player.GetName() if text[0] == '/' and text[1] == 'n' and text[2] == ' ': newtext = text.split(' ', 1) net.SendChatPacket(newtext[0] + " " + player.GetName() + ": " + newtext[1], chat.CHAT_TYPE_TALKING) self.__ResetChat() else: self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING) self.__ResetChat()
Inlocuim cudef __SendTalkingChatPacket(self, text): self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING) self.__ResetChat()
cum fac sa nu mai apara?
- șumahăr
-

- Mesaje: 701
- Membru din: 29 Iun 2018, 13:50
- Aprecieri: 187
- Mulţumiri: 2319
- Discord: Copiază ID
Daca nu-ti apare, fa opusul tutorialuluiionut669 scrie:Am rezolvat acum pe /n Merge apare bine problema e pe ca apare numele si pe /NKravyus. scrie:1.Extragem root.eix/.epk
2.Intram în uichat.py de preferabil cu notepad++
3.Cautam la inceput:
import player2.Căutăm:
def __SendTalkingChatPacket(self, text): characterName = player.GetName() if text[0] == '/' and text[1] == 'n' and text[2] == ' ': newtext = text.split(' ', 1) net.SendChatPacket(newtext[0] + " " + player.GetName() + ": " + newtext[1], chat.CHAT_TYPE_TALKING) self.__ResetChat() else: self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING) self.__ResetChat()
Inlocuim cudef __SendTalkingChatPacket(self, text): self.__SendChatPacket(text, chat.CHAT_TYPE_TALKING) self.__ResetChat()
cum fac sa nu mai apara?
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 13 vizitatori

