广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 14350 个阅读者
 
<< 上页  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 鲜花 x5
分享: 转寄此文章 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.025026 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言