【101%原創】※一般系列※ 全新師氣計分牌

Home Home
引用 | 編輯 龍心
2017-11-01 22:10
樓主
推文 x0

圖 1.


【插件資訊】

插件來源:網路資源轉載提供會員參考
使用指令:自行修改編譯及參考http://bbs.mychat.tw/reads.php?tid=1003858
安裝路徑:自行修改編譯及參考http://bbs.mychat.tw/reads.php?tid=1003858

【插件介紹】

複製程式


new ct_win;
new tr_win;
new g_maxplayers;


public plugin_init()
{
    register_plugin(12, "1.0", "KennyKo");
    register_message(get_user_msgid("TextMsg"), "message_textmsg");
    g_maxplayers = get_maxplayers();
    set_task(1.00, "show_hud_client", 0, "", 0, "b", 0);
    return 0;
}


public message_textmsg()
{
    static textmsg[22];
    get_msg_arg_string(2, "", 21);
    if (equal("", "#Terrorists_Win", 0))
    {
        tr_win = tr_win + 1;
    }
    if (equal("", "#CTs_Win", 0))
    {
        ct_win = ct_win + 1;
    }
    return 0;
}


public show_hud_client()
{
    new id = 1;
    while (id <= g_maxplayers)
    {
        set_hudmessage(255, 255, 255, -1.00, 0.01, 0, 6.00, 1.10, 0.00, 0.00, 4);
        show_hudmessage(id, "*一般模式:比賽地圖*\n  反恐小隊 | %d | [ 回合 %d ] | %d | 恐怖分子\n%d | VS | %d", ct_win, tr_win + ct_win, tr_win, GetTotalPlayer(2, 1), GetTotalPlayer(1, 1));
        id++;
    }
    return 0;
}


GetTotalPlayer(team, alive)
{
    static id;
    static total;
    total = 0;
    id = 1;
    while (id <= g_maxplayers)
    {
        if ((alive && is_user_alive(id)) || (!alive && is_user_connected(id)))
        {
            if ((team == 1 && fm_cs_get_user_team(id) == 1) || (team == 2 && fm_cs_get_user_team(id) == 2) || team)
            {
                total += 1;
                id += 1;
            }
            id += 1;
        }
        id += 1;
    }
    return total;
}


fm_cs_get_user_team(id)
{
    return get_pdata_int(id, 114, 5);
}




獻花 x0
引用 | 編輯 大几把
2023-06-09 00:16
1樓
  
谢谢分享

獻花 x0