Announcement

Collapse
No announcement yet.

color name ?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    color name ?

    Hi,

    here is how to put color in the chat :

    PHP Code:
    AddEvent("OnPlayerChat", function(playertext)
        
    AddPlayerChatAll('<span color="#d9803d">'..GetPlayerName(player)..'</>'.." : ".. text)
    end 

    just type color picker on google and pick the HEX code
    Last edited by MisTerioN; 01-01-2020, 05:39 PM.

    #2
    Could you rename the thread : " How to add chat text colors? " or so, so one could use the search bar and found the answer easily?

    Comment


      #3
      Hi,

      Could anyone explain to me why this Code is working?

      Code:
       AddPlayerChatAll('<span color="#d9803d">'..GetPlayerName(player)..'</>'.." : ".. text)



      ..But this Code doesn't work?

      Code:
       AddPlayerChatAll('<b>'..GetPlayerName(player)..'</b>'.." : ".. text)
      It doesn't seem to be HTML in the CHAT ?

      Comment


        #4
        carparso
        The chat is not HTML, it only has a faked <span> tag with size style and color.
        Code:
        AddPlayerChat('<span color="#ff0000bb" style="bold" size="10">'..message..'</>')

        Comment

        Working...
        X