又畀cs板主ban左 發表於 11-1-2011 06:25:48

register_clcmd("say_team","function_name")

public function_name(id)
{
      new name
      new text
      get_user_name(id, name, 32)
      read_args(text,191)
      remove_quotes(text)

      if (equal(text, ""))
                return PLUGIN_HANDLED

      new loop
      switch (cs_get_user_team(id))
      {
                case CS_TEAM_CT:
                {
                        for (loop = 1; loop <= maxplayers; loop++)
                        {
                              if (!is_user_connected(loop)) continue;
                              if (cs_get_user_team(loop) != CS_TEAM_CT) continue;
                              client_print(loop, print_chat, " %s : %s", name, test)
                        }
                }
                case CS_TEAM_T:
                {
                        for (loop = 1; loop <= maxplayers; loop++)
                        {
                              if (!is_user_connected(loop)) continue;
                              if (cs_get_user_team(loop) != CS_TEAM_T) continue;
                              client_print(loop, print_chat, " %s : %s", name, test)
                        }
                }
      }
      return PLUGIN_HANDLED
}

chantikki 發表於 12-1-2011 16:06:40

register_clcmd("say_team","function_name")

public function_name(id)
{
      new name
         ...
又畀cs板主ban左 發表於 11-1-2011 06:25 http://www.nakuz.com/bbs/images/common/back.gif


唔該:) !

Abcdzxc555 發表於 13-1-2011 23:53:33

new test,錯左
改為new text
仲有兩段client_print後面個test改番做text

chantikki 發表於 16-1-2011 01:10:40

new test,錯左
改為new text
仲有兩段client_print後面個test改番做text
Abcdzxc555 發表於 13-1-2011 23:53 http://www.nakuz.com/bbs/images/common/back.gif

頁: 1 [2]
查看完整版本: sma一問