What Is the correct way?
White <- RGB(192,192,192);
ClientMessage( "Blah", player, White);
Does not work is there other methods to keep colors clean?
Sorry on my android away from *PC
Why not use MessagePlayer?
There's a RGB to HEX converter, see it, that may help you!
I will look Into that. I was not to worried about it until I began adding language supports that are still being built but are in this format
Language(English, "Login before spawning! /login [password]", player, 12,255,245);
Language(Spanish, "Login antes de desove! /Iniciar sesion [Contrasena]", player, 12,255,245);
So it would be nice to create universal color codes to clear things up example
Language(English, "Login before spawning! /login [password]", player, White);
Language(Spanish, "Login antes de desove! /Iniciar sesion [Contrasena]", player, White);
And that weird code. Right now its 0 or 1 but working on adding the language names instead
function Language(language, message, player, R,G,B) {
if ((Account[player.ID].lang) == language) {
ClientMessage( message,player,R,G,B);
//MessagePlayer("[#ffffff]"+message+"",player);
}
}
make the function like this
function Language(language, message, player, rgb) {
if ((Account[player.ID].lang) == language) {
ClientMessage( message,player,rgb.r, rgb.g, rgb.b);
}
}
??? What would the out put on that look like? I hope not messy?
Quote from: Mötley on May 17, 2016, 03:10 AM??? What would the out put on that look like? I hope not messy?
Just like the old RGB.
I never knew that format as I am new to VC:MP.
also I came across this in Force [LU] Release of FBS what is it?
const COL_YELLOW = "\x000308";
const COL_LGREEN = "\x000309";
const COL_CYAN = "\x000310";
const COL_LCYAN = "\x000311";
const COL_LBLUE = "\x000312";
const COL_PINK = "\x000313";
const COL_GREY = "\x000314";
const COL_LGREY = "\x000315";
const COL_BOLD = "\x0002";
const COL_ULINE = "\x0031";
print( COL_BOLD );
Those colors are used with IRC and are no of no use in server.
After playing with the code I do not see anything different from the code I already have,.
Quote from: Mötley on May 17, 2016, 04:27 AMAfter playing with the code I do not see anything different from the code I already have,.
Well, you wanted to put a White instead of 255,255,255 in the parameter. So, I showed you the way.
WHOA!!! :o Okay The problem was me. I scripted way!!!!! to much yesterday with bug testing and stress testing etc. As you see personally I thing the code I posted is a VERY interesting code. It took a while to get it where I wanted it,,
Sadly I cant get English, Spanish to work,. I keep getting the error that 'English' does not exist. I believe it was a overload issue.
I will re look into this today while it is still early.
Quote from: Mötley on May 17, 2016, 01:56 PMSadly I cant get English, Spanish to work,. I keep getting the error that 'English' does not exist. I believe it was a overload issue.
I will re look into this today while it is still early.
Maybe because you didn't define it anywhere, either use a string or a constant having a number.
So,
const ENGLISH = 1;
const SPANISH = 2;
Something which you like would be ok, if you use constants, then it'll be better as you can change every number/string of the class( or whatever ) by rewriting only 1 line :P
I found my mistake first thing when i woke up as well and that fix was
Language("English", "Login before spawning! /login [password]", player, Red);
and in class
lang = "";
**FACEPALM
As I said did to much yesterday