Control other player's chats

Posts 1–12 of 12 · Page 1 of 1
Control other player's chats
Credits goes to [CodBOMOD]Nukem

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
nice thanks man, will it work for cod 4 aswell?
Quote Originally Posted by FrostyTheSnowCone View Post
nice thanks man, will it work for cod 4 aswell?
I don't think so :/
Quote Originally Posted by FrostyTheSnowCone View Post
nice thanks man, will it work for cod 4 aswell?
Probably yes, all those functions are in cod4.
this is interesting
lol what can you do with that code? i dont understand it :s
Quote Originally Posted by Yoski View Post
lol what can you do with that code? i dont understand it :s
Make another player talk

Controlar el chat de otro usuario, hacerle decir lo que quieras, .
Quote Originally Posted by Yamato View Post
Make another player talk

Controlar el chat de otro usuario, hacerle decir lo que quieras, .
Thx Yamato do you speak Spanish too? (:
PD:I tried it and it dont works 4 me, because i have a problem: i can only put 1 textline on the console, i can't put the complete code :s
Thx ^^
Quote Originally Posted by Yoski View Post
Thx Yamato do you speak Spanish too? (:
PD:I tried it and it dont works 4 me, because i have a problem: i can only put 1 textline on the console, i can't put the complete code :s
Thx ^^
Only 1 line.

Si, solo una linea, mas no se puede, escribe el texto en varios trozos.
Yamata didnt u use this code in ur OMA zombie mod? :0
Quote Originally Posted by xbeatsszzx View Post
Yamata didnt u use this code in ur OMA zombie mod? :0
No, I will add it, ;P
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?