Care mă poate ajuta să introduc numele regatului pe strigă ???
Dau THX.
Care mă poate ajuta ?
#uppp
#Uppp
Uite gen asta :Conne scrie:fi ma explictit cand pui intrebarile
Tutorialul este explicat destul de bine ,dar am băgat codurile respective și nu mi-a mers deloc .
Am căutat alte rezolvări pe Google dar în zadar ,tot degeaba nu am găsit nimic să mă rezolve.
#Uppp
Cod: Selectaţi tot
def __SendChatPacket(self, text, type):
if net.IsChatInsultIn(text):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING)
return
#START EMPIRECHAT#
if type == chat.CHAT_TYPE_SHOUT:
import time
empire_chatime = empire_chatime = time.strftime("%H:%M:%S")
name_check = player.Getname_check()
empire_check = int(net.GetEmpireID(name_check))
simple_check = {
1: 'Rosu',
2: 'Galben',
3: 'Albastru'
}
empire_color = {
1: '|cFFFF0000|H|h', # Regat Rosu
2: '|cFFFFFF00|H|h', # Regat Galben
3: '|cFF0080FF|H|h' # Regat Albastru
}
text2_color = {
1: '|cFFFFFF00|H|h', # Text
}
text_color = str(simple_check[empire_check]) + str(empire_color[empire_check]) + text
if empire_check == 1:
#empire_chat = text + " " + str(empire_color[1]) + " rasa : " + str(simple_check[empire_check]) + str(empire_color[1]) + str(empire_color[3]) + " timp : " + "[" + str(empire_chatime) + "]"
empire_chat = text + " " + str(empire_color[1]) + " " + str(simple_check[empire_check]) + str(empire_color[1]) + str(empire_color[3]) + " " + "[" + str(empire_chatime) + "]"
net.SendChatPacket(empire_chat, type)
if empire_check == 2:
empire_chat = text + " " + str(empire_color[2]) + " " + str(simple_check[empire_check]) + str(empire_color[3]) + " " + "[" + str(empire_chatime) + "]"
net.SendChatPacket(empire_chat, type)
elif empire_check == 3:
empire_chat = text + " " + str(empire_color[3]) + " " + str(simple_check[empire_check]) + str(empire_color[2]) + " " + "[" + str(empire_chatime) + "]"
net.SendChatPacket(empire_chat, type)
else:
#END EMPIRECHAT#
net.SendChatPacket(text, type)- [Mafia83]
-

- Mesaje: 777
- Membru din: 24 Feb 2016, 20:32
- Server: Metin2KGB
- Regat: Jinno
- Aprecieri: 279
- Mulţumiri: 2287
- Discord: Copiază ID
- Contact:
Probabil baiatul vrea sa faca chat global si sa apara numele regatului acelui player care scrie pe striga 
Spune.mi și mie exact ce trebuie să fac cu asta ,așa fără să.mi zici unde pun eu codu ?VegaS™ scrie:Cod: Selectaţi tot
def __SendChatPacket(self, text, type): if net.IsChatInsultIn(text): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING) return #START EMPIRECHAT# if type == chat.CHAT_TYPE_SHOUT: import time empire_chatime = empire_chatime = time.strftime("%H:%M:%S") name_check = player.Getname_check() empire_check = int(net.GetEmpireID(name_check)) simple_check = { 1: 'Rosu', 2: 'Galben', 3: 'Albastru' } empire_color = { 1: '|cFFFF0000|H|h', # Regat Rosu 2: '|cFFFFFF00|H|h', # Regat Galben 3: '|cFF0080FF|H|h' # Regat Albastru } text2_color = { 1: '|cFFFFFF00|H|h', # Text } text_color = str(simple_check[empire_check]) + str(empire_color[empire_check]) + text if empire_check == 1: #empire_chat = text + " " + str(empire_color[1]) + " rasa : " + str(simple_check[empire_check]) + str(empire_color[1]) + str(empire_color[3]) + " timp : " + "[" + str(empire_chatime) + "]" empire_chat = text + " " + str(empire_color[1]) + " " + str(simple_check[empire_check]) + str(empire_color[1]) + str(empire_color[3]) + " " + "[" + str(empire_chatime) + "]" net.SendChatPacket(empire_chat, type) if empire_check == 2: empire_chat = text + " " + str(empire_color[2]) + " " + str(simple_check[empire_check]) + str(empire_color[3]) + " " + "[" + str(empire_chatime) + "]" net.SendChatPacket(empire_chat, type) elif empire_check == 3: empire_chat = text + " " + str(empire_color[3]) + " " + str(simple_check[empire_check]) + str(empire_color[2]) + " " + "[" + str(empire_chatime) + "]" net.SendChatPacket(empire_chat, type) else: #END EMPIRECHAT# net.SendChatPacket(text, type)
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 78 vizitatori


