ItsMods

Full Version: Control other player's chats
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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"
next type in
Code:
ann "text"
which in example:
Code:
annp KillerSomeone
ann "im stupid"

P.S.
annp = announceplayer
ann = announce
wow what the fuck does this work in multiplayer?
lol, thats fucked up, And yes it does work in multiplayer, its a mod.
Awesome nice work haha
loool, funny, Tongue
Quite nice to discover this.
ok srry noob question but i dont know how to implment this could someone explain plz
Send Topicstarter a PM for help.
Nice function for admin Big Grin Thanks