廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 14242 個閱讀者
 
<< 上頁  2   3   4   5  >>(共 5 頁)
發表文章 發表投票 回覆文章
  可列印版   加為IE收藏   收藏主題   上一主題 | 下一主題   
zxc000
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x0 鮮花 x1
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片
Re:一般模式计分版
为什么我加上去,一闪一闪的?


獻花 x0 回到頂端 [40 樓] From:IANA保留地址 | Posted:2020-02-03 23:41 |
swi28655ol
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前不上站
推文 x0 鮮花 x0
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

我來修正問題~~
首先 樓主的內容是
只能在沒有任務的地圖 單純歹徒或者警察勝利可運用
再來 重點 當回合刷新以及連線成功刷新時 分數並不會歸零

因此 我統整了~~~
1.爆破 人質 VIP 各種回合結束計分

2.回合刷新以及連線成功刷新歸零
補充 HUD優先權已設定 除非畫面太花 不然不太會一直閃個不停

以上

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "記分板及剩餘人數"
#define VERSION "1.0"
#define AUTHOR "MeiX"

const OFFSET_CSTEAMS = 114
const OFFSET_LINUX = 5

enum
{
     FM_CS_TEAM_UNASSIGNED = 0,
     FM_CS_TEAM_T,
     FM_CS_TEAM_CT,
     FM_CS_TEAM_SPECTATOR
}

new ct_win,tr_win,c_win,t_win,ctt_win,trr_win,cttt_win,trrr_win,ctttt_win,trrrr_win,g_maxplayers

public plugin_init()
{
    register_plugin(PLUGIN,VERSION,AUTHOR)
    register_message(get_user_msgid("TextMsg"), "message_textmsg")
    g_maxplayers = get_maxplayers()
    set_task(1.0, "show_hud_client", _, _, _, "b")
}
public message_textmsg()
{
     static textmsg[22]
     get_msg_arg_string(2, textmsg, charsmax(textmsg))
     
     if (equal(textmsg, "#Terrorists_Win")) tr_win += 1
     if (equal(textmsg, "#CTs_Win")) ct_win += 1
     if (equal(textmsg, "#Target_Bombed")) t_win += 1
     if (equal(textmsg, "#Bomb_Defused")) c_win += 1
     if (equal(textmsg, "#Target_Saved")) ctt_win += 1
     if (equal(textmsg, "#Hostages_Not_Rescued")) trr_win += 1
     if (equal(textmsg, "#All_Hostages_Rescued")) cttt_win += 1
     if (equal(textmsg, "#VIP_Assassinated")) trrr_win += 1
     if (equal(textmsg, "#VIP_Not_Escaped")) trrrr_win += 1
     if (equal(textmsg, "#VIP_Escaped")) ctttt_win += 1
     // Game restarting/Game commencing, reset scores
     if (equal(textmsg, "#Game_will_restart_in") || equal(textmsg, "#Game_Commencing"))
     {
           tr_win = 0
           ct_win = 0
           t_win = 0
           c_win = 0
           ctt_win = 0
           trr_win = 0
           cttt_win = 0
           trrr_win = 0
           trrrr_win = 0
           ctttt_win = 0
     }
}
public show_hud_client()
{
      for (new id = 1; id <= g_maxplayers; id++)
      {
      set_hudmessage(0, 255, 0, -1.0, 0.015, 0, 6.0, 1.1, 0.0, 0.1, -1)
      show_hudmessage(id, "\__反恐小組%d局 [目前%d局結束] 恐怖份子%d局__/^n\__反恐小組%d人   恐怖份子%d人__/", ct_win+c_win+ctt_win+cttt_win+ctttt_win, ct_win+c_win+ctt_win+cttt_win+ctttt_win+tr_win+t_win+trr_win+trrr_win+trrrr_win, tr_win+t_win+trr_win+trrr_win+trrrr_win, GetTotalPlayer(2, 1), GetTotalPlayer(1, 1))
      }
}
GetTotalPlayer(team, alive)
{
     // team: 1 is TE, 2 is CT, 3 is Zombie, 4 is Human, 0 is all
     // alive: 0 is death and alive, 1 is alive
     static total, id
     total = 0
     
     for (id = 1; id <= g_maxplayers; id++)
     {
           if ( (alive && is_user_alive(id)) || (!alive && is_user_connected(id)) )
           {
                 if (
                 team == 1 && fm_cs_get_user_team(id) == FM_CS_TEAM_T ||
                 team == 2 && fm_cs_get_user_team(id) == FM_CS_TEAM_CT ||
                 team == 0
                 ) total++
           }
     }
     
     return total;
}
stock fm_cs_get_user_team(id)
{
     return get_pdata_int(id, OFFSET_CSTEAMS, OFFSET_LINUX);
}



獻花 x0 回到頂端 [41 樓] From:歐洲 | Posted:2020-10-02 17:15 |
陳冠冠
個人文章 個人相簿 個人日記 個人地圖
小人物
級別: 小人物 該用戶目前上站
推文 x0 鮮花 x4
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

能不能改 增加 只有自己得多少殺敵分數? 表情 表情


獻花 x0 回到頂端 [42 樓] From:台灣大哥大股份有限公司 | Posted:2024-01-05 09:55 |
lonkystar
個人文章 個人相簿 個人日記 個人地圖
路人甲
級別: 路人甲 該用戶目前不上站
推文 x0 鮮花 x1
分享: 轉寄此文章 Facebook Plurk Twitter 複製連結到剪貼簿 轉換為繁體 轉換為簡體 載入圖片

看著不錯的樣子,感謝分享!


獻花 x0 回到頂端 [43 樓] From:沒有資料 | Posted:2024-02-07 10:56 |

<< 上頁  2   3   4   5  >>(共 5 頁)
首頁  發表文章 發表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.020994 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言