找回密碼
 註冊
[日本手機遊戲APPS下載] 手機遊戲專區 熱門短片

型男索女 
樓主: kining2008

sma一問

    [複製鏈接]
發表於 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-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-1-2011 23:53:33 | 顯示全部樓層
new test[192],錯左
改為new text[192]
仲有兩段client_print後面個test改番做text
回復 支持 反對

使用道具 舉報

發表於 16-1-2011 01:10:40 | 顯示全部樓層
new test[192],錯左
改為new text[192]
仲有兩段client_print後面個test改番做text
Abcdzxc555 發表於 13-1-2011 23:53


回復 支持 反對

使用道具 舉報

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

本版積分規則

小黑屋|Archiver|手機版|Nakuz.com |網站地圖

GMT+8, 3-5-2025 03:18 , Processed in 0.021340 second(s), 10 queries , MemCache On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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