You cease amxx scripting for months and already forget a lot...
I've tried different ways that I already forgot and that take up more lines and still don't give the result I want. Here's a code that generates a serial code'ish code.
PHP Code:
new const gSChars[][] = {"AKA", "AKB", "AKC"};
public CmdGenSC(id)
{
new SCode[20];
format(SCode, charsmax(SCode),
"^x04Generation:^x03 %s%d/%d%/%d/%d",
gSChars[random_num(0, charsmax(gSChars))],
random_num(0, 9),
random_num(100, 999),
random_num(10, 99),
random_num(10000, 99999)
);
ColorChat(id, GREY, "%s", SCode);
return PLUGIN_CONTINUE;
}
What it should print: "
Generation: AKA5/342/23/17063"
(numbers are randomly generated as you can tell from the code)
What it prints: "
Generation: A"
Don't judge