Forum

> > CS2D > Scripts > Broadcast and something else
Forums overviewCS2D overview Scripts overviewLog in to reply

English Broadcast and something else

6 replies
To the start Previous 1 Next To the start

old Broadcast and something else

Talented Doge
User Off Offline

Quote
I'm currently working on broadcast say commands. I have already looked on some scripts that contains "!cmd txt" commands but still I don't get how it works. May anybody tell me how it works?

old Re: Broadcast and something else

TopNotch
User Off Offline

Quote
I guess you want a broadcast command?
1
2
3
4
5
6
7
8
addhook("say","_say")
function _say(id, txt)
   if txt:sub(1,3)=="!bc" then
      local msg = txt:sub(5)
      msg(player(id,"name").." (broadcast): "..msg)
      return 1
   end
end
This should be the simplest way of doing it.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview