Can anyone help me with some code I think I need a dictionary to take input from the player ("red", "yellow", etc) and convert to an HTML hex color to be then be set into a variable ( an example of how to use the dictionary)
If I could get some code for a small dictionary of colors (like four) - I'll try to figure out the rest?
Color dictionary from input to HEX
Discussion in 'Rust Development' started by isuelt, Nov 14, 2015.
-
Wulf Community Admin
What are you planning on doing with the HEX colors? Rust/Unity supports the regular color names already if you are looking at changing the color of messages. Ie. <color=red>
-
Use them to send info to a website that accepts HTML hex colors. The user inputs info and the website processes the request, using the color codes. I'd just like to make some basic colors for the players to use - cuz who's going to know the HTML Hex color codes!
-
Wulf Community Admin
To get it... if they are entering it in the chat, just hook into OnPlayerChat or OnRunCommand and check if arg.GetString(0) contains what you want.
To store it... you'd need a bit more, which I can't think of at this moment. -
can you point me to some plugins that use dictionary lookups?
