Englisch How can be just txt side colored.

3 Antworten
Gehe zu Seite
Zum Anfang Vorherige 1 Nächste Zum Anfang
Hoch
phalenkO
User
Offline Off
How can the nickname of the player be the color of the team?So, like normal lua but txt side colored. How can I do that?
12.06.18 21:39:43
Hoch
Rainoth
Moderator
Offline Off
Code:
addhook("say","_s")
function _s(id,text)
     if player(id,"team") == 1 then
          text = "\169255000000"..player(id,"name")..":\169255255255"..text
     elseif player(id,"team") == 2 then
          text = "\169000000255"..player(id,"name")..":\169255255255"..text


Then make sure you message the text and handle return properly.
12.06.18 21:56:52
Hoch
KingShadow
User
Offline Off
also if you want normal colors teamcolor:yellow thats it tested without problems

Code:
1
2
3
4
5
6
7
8
9
10
addhook("say","_say")
function _say(id,txt)
          if player(id,"team")==1 then
               msg("\169255025000"..player(id,"name").." \169255255000: "..txt)
               return 1
          elseif player(id,"team")==2 then
               msg("\169000128255"..player(id,"name").." \169255255000: "..txt)
               return 1     
     end
end
13.06.18 03:37:44
Hoch
phalenkO
User
Offline Off
@user KingShadow: @user Rainoth: Thank you
Zum Anfang Vorherige 1 Nächste Zum Anfang