something like this should work
PHP Code:
new mapname[32];
public plugin_init() get_mapname(mapname, 31);
stock setColor(string[], len)
{
if (contain(string, "!t") != -1 || contain(string, "!g") != -1 || contain(string,"!n") != -1)
{
//Some nice shiny colors ^^
replace_all(string, len, "!t", "^x03");
replace_all(string, len, "!n", "^x01");
replace_all(string, len, "!g", "^x04");
//Work away a stupid bug
format(string, len, "^x01%s", string);
}
if (contain(string, "%online%") != -1)
{
replace_all(string, len, "%online%", fmt("%d", get_playersnum()));
}
if (contain(string, "%mapname%") != -1)
{
replace_all(string, len, "%mapname%", mapname);
}
}
__________________