English How can be just txt side colored.

3 replies
Goto Page
To the start Previous 1 Next To the start
Up
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 09:39:43 pm
Up
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 09:56:52 pm
Up
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 am
Up
phalenkO
User
Offline Off
@user KingShadow: @user Rainoth: Thank you
To the start Previous 1 Next To the start