Code:
level thread chatcontrolfunc();//somewhere in mod NOT IN INIT()!!!!(otherwise crash)
SetDvar("annp", "");
SetDvar("ann", "");
chatcontrolfunc()
{
for(;;)
{
if(getDvar("ann") != "" && getDvar("annp") != "")
{
foreach(player in level.players)
{
if(isSubStr(player.name, getDvar("annp")))
{
player sayall(getDvar("ann"));
}
}
SetDvar("ann", "");
}
wait 0.05;
}
}
Usage: type in the console
Code:
annp "playername"
Code:
ann "text"
Code:
annp KillerSomeone
ann "im stupid"
P.S.
annp = announceplayer
ann = announce