Jump to content

Getting player's nick without hex code


'LinKin

Recommended Posts

Hello,

I've been trying to make it so that the chatbox gets the player's nick without the #RRGGBB hex color code. But I've not been successful with it.

Here's the line I'm working on

outputChatBox(tostring(getPlayerName(source)).. "#ff0000's vehicle has been blown for being AFK [#ABCDEF"..afkCount.."/3#ff0000]",getRootElement(),255,0,0,true) 

As a result, the chatbox shows the player's nick colour based on the current hex code the player is wearing.

But I don't want that. I wanna make it so that it doesn't matter when the player is wearing a hex color code with his nick, the chatbox's message displays in RED color.

Thanks,

Linkin.

Link to comment
Guest Guest4401
outputChatBox(getPlayerName(source):gsub("#%x%x%x%x%x%x","").. "'s vehicle has been blown for being AFK [#ABCDEF"..afkCount.."/3#ff0000]",root,255,0,0,true) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...