24.09.2018, 06:55
Limit text to 6 characters long (RRGGBB) and check if it is a hex number:
pawn Код:
// example:
new colour;
if (strlen(inputtext) == 6 && !sscanf(inputtext, "x", colour))
{
// your code
}