Convert to hex
I couldn't find any natives for converting a decimal number to hex.
I have an RGB value that would be a lot happier as a hex value ( for showing in an MOTD window) and I was wondering if there's an easy way. I could do write an rgb_to_hex() function, but if there's an obvious way I don't know about then I'd feel like a tool. EDIT: Well since I didn't find one, anyone who reads this hoping for an answer can use this: Code:
It seems weird to have the string one character too long, but AMX gets a tad confused if you don't terminate your strings in my experience. |
| All times are GMT -4. The time now is 16:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.