找回密碼
 註冊
樓主: kining2008
打印 上一主題 下一主題
收起左側

sma一問

   關閉 [複製鏈接]
11#
發表於 11-1-2011 06:25:48 | 只看該作者
register_clcmd("say_team","function_name")

public function_name(id)
{
        new name[33]
        new text[192]
        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, "[CT隊頻] %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, "[T隊頻] %s : %s", name, test)
                        }
                }
        }
        return PLUGIN_HANDLED
}
回復 支持 反對

使用道具 舉報

12#
發表於 12-1-2011 16:06:40 | 只看該作者
register_clcmd("say_team","function_name")

public function_name(id)
{
        new name[33]
         ...
又畀cs板主ban左 發表於 11-1-2011 06:25



唔該 !
回復 支持 反對

使用道具 舉報

13#
發表於 13-1-2011 23:53:33 | 只看該作者
new test[192],錯左
改為new text[192]
仲有兩段client_print後面個test改番做text
回復 支持 反對

使用道具 舉報

14#
發表於 16-1-2011 01:10:40 | 只看該作者
new test[192],錯左
改為new text[192]
仲有兩段client_print後面個test改番做text
Abcdzxc555 發表於 13-1-2011 23:53


回復 支持 反對

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

快速回復 返回頂部 返回列表