"\x07FFFFFF" is a 64 bit large string, you're not going to be able to put that into a 8 bit large char
you can do something like this:
PHP Code:
stock String:GetColorChar(const String:sColor[])
{
decl String:ret[50];
if (!strcmp(sColor, "{green}", false))
{
strcopy(ret, sizeof(ret), "\x04");
}
else if (sColor[0] == '#')
{
FormatEx(ret, sizeof(ret), "\x07%s", sColor[1]);
}
else
{
strcopy(ret, sizeof(ret), "\x01");
}
return ret;
}
public void OnPluginStart()
{
new String:x[50];
x = GetColorChar("{green}");
PrintToChatAll(" zzz %s Test 1", x);
x = GetColorChar("#FFFFFF");
PrintToChatAll(" zzz %s Test 2", x);
}
but that still isn't a char