搜索
查看: 2951|回复: 7

【求助】我的miscstats.txt有问题!

[复制链接]
发表于 2009-3-30 12:24:41 | 显示全部楼层 |阅读模式 来自 福建厦门
本帖最后由 火飞寒 于 2009-4-3 09:57 编辑

服务器重启时,看到有提示miscstats.txt加载错误!提示大致是:invalid line, cstrike\addons\amxmodx\data\lang\miscstats.txt   line 1
那位前辈帮忙看看?到底是什么问题?
[en]
WITH = with
KNIFE_MSG_1 = %s sliced and diced %s
KNIFE_MSG_2 = %s pulled out knife and gutted %s
KNIFE_MSG_3 = %s sneaks carefully behind and knifed %s
KNIFE_MSG_4 = %s knived %s
LAST_MSG_1 = Now all depend on you!
LAST_MSG_2 = I hope you still have a healthpack.
LAST_MSG_3 = All your teammates were killed. Good luck!
LAST_MSG_4 = Now you are alone. Have fun!
HE_MSG_1 = %s sends a little gift to %s
HE_MSG_2 = %s throws a small present to %s
HE_MSG_3 = %s made a precision throw to %s
HE_MSG_4 = %s got a big explosion for %s
SHE_MSG_1 = %s detonated himself with a grenade
SHE_MSG_2 = %s trys the effect of an HE Grenade
SHE_MSG_3 = %s swallows grenades whole!
SHE_MSG_4 = %s explodes!
HS_MSG_1 = $kn killed $vn with a well^nplaced shot to the head!
HS_MSG_2 = $kn removed $vn's^nhead with the $wn
HS_MSG_3 = $kn turned $vn's head^ninto pudding with the $wn
HS_MSG_4 = $vn got pwned by $kn
HS_MSG_5 = $vn's head has been^nturned into red jello
HS_MSG_6 = $kn has superb aim with the $wn,^nas $vn well knows.
HS_MSG_7 = $vn's head stayed in $kn's^ncrosshairs a bit too long...
DOUBLE_KILL = Wow! %s made a double kill!!!
PREPARE_FIGHT = Prepare to FIGHT!^nRound %d
KILLED_ROW = You've killed %d in a row so far
DIED_ROUNDS = Careful! You've died %d rounds in a row now...
KILLED_CHICKEN = Somebody killed a chicken!!!
BLEW_RADIO = Somebody blew up the radio!!!
REACHED_TARGET = Omg! %s reached the target!
PLANT_BOMB = %s is planting the bomb!
DEFUSING_BOMB = %s is defusing the bomb...
SET_UP_BOMB = %s set us up the bomb!!!
DEFUSED_BOMB = %s defused the bomb!
FAILED_DEFU = %s failed to defuse the bomb...
PICKED_BOMB = %s picked up the bomb...
DROPPED_BOMB = %s dropped the bomb!!!
REMAINING = %d %s Remaining...
KILLS = kills
HS = HS
MULTI_MSG = Multi-Kill! %s
ULTRA_MSG = Ultra-Kill!!! %s
SPREE_MSG = %s IS ON A KILLING SPREE!!!
RAMPAGE_MSG = RAMPAGE!!! %s
UNSTOPPABLE_MSG = %s IS UNSTOPPABLE!!!
MONSTER_MSG = %s IS A MONSTER!
GODLIKE_MSG = %s IS GODLIKE!!!!
MULTI_SMALL = %s: Multi-Kill!
ULTRA_SMALL = %s: Ultra-Kill!!!
SPREE_SMALL = %s IS ON A KILLING SPREE!!!
RAMPAGE_SMALL = %s: RAMPAGE!!!
UNSTOPPABLE_SMALL = %s IS UNSTOPPABLE!!!
MONSTER_SMALL = %s IS A MONSTER!
GODLIKE_SMALL = %s IS GODLIKE!!!
VS = vs.
HP = HP
AP = AP

[cn]
WITH = 共计
KNIFE_MSG_1 = %s 把 %s 割成了肉片
KNIFE_MSG_2 = %s 拔出身上的刀干掉了 %s
KNIFE_MSG_3 = %s 小心地在 %s 的身后抽刀干掉了他
KNIFE_MSG_4 = %s 用刀戳死了 %s
LAST_MSG_1 = 现在全部希望都在你身上
LAST_MSG_2 = 我真希望你有个急救包
LAST_MSG_3 = 你的队员都被干掉了 祝你好运
LAST_MSG_4 = 现在就剩你一个人了 玩得开心
HE_MSG_1 = %s 送了一个小小的礼物给 %s
HE_MSG_2 = %s 丢了一个小礼物给 %s
HE_MSG_3 = %s 准确地将手榴弹投掷给 %s
HE_MSG_4 = %s 把 %s 炸飞了
SHE_MSG_1 = %s 被自己的手榴弹炸死
SHE_MSG_2 = %s 亲身试验手榴弹的威力
SHE_MSG_3 = %s 吞了整个手榴弹
SHE_MSG_4 = %s 自爆了
HS_MSG_1 = $kn 一枪打爆了 $vn 的头
HS_MSG_2 = $kn 用 $wn 轰掉了 $vn 的头
HS_MSG_3 = $kn 用 $wn 将 $vn 的头打的血肉模糊
HS_MSG_4 = $vn 被 $kn 打的灰飞烟灭
HS_MSG_5 = $vn 的头被打成了肉酱
HS_MSG_6 = $kn 握着他最精准 $wn^n只有 $vn 才能知道他有多神勇
HS_MSG_7 = $vn 的头停留在 $kn 的准心下太长时间了...
DOUBLE_KILL = 哇哇... %s 打出了漂亮的双杀
PREPARE_FIGHT = 投入战斗中...^n第 %d 回合
KILLED_ROW = 到目前为止你已经连续杀掉了 %d 个人
DIED_ROUNDS = 小心...你现在已经连续 %d 局被杀死了
KILLED_CHICKEN = 有人杀掉了小鸡
BLEW_RADIO = 有人炸掉了收音机
REACHED_TARGET = 呀呀... %s 到达了目标
PLANT_BOMB = %s 正在...安装炸弹
DEFUSING_BOMB = %s 正在...拆除炸弹
SET_UP_BOMB =  %s 成功装好了炸弹
DEFUSED_BOMB = %s 成功拆除了炸弹
FAILED_DEFU =  %s 拆除炸弹失败
PICKED_BOMB = %s 捡起了炸药包
DROPPED_BOMB =  %s 丢掉了炸药包
REMAINING = 还剩 %d 个 %s ...
KILLS = 杀敌
HS = 爆头
MULTI_MSG = 干的好 %s
ULTRA_MSG = 真能杀 %s
SPREE_MSG = %s 简直是狂战士
RAMPAGE_MSG = 杀人王 %s
UNSTOPPABLE_MSG = %s 势不可挡
MONSTER_MSG = %s 简直是魔王
GODLIKE_MSG = %s 如同上帝
MULTI_SMALL = %s 干的好
ULTRA_SMALL = %s 真能杀
SPREE_SMALL = %s 简直是狂战士
RAMPAGE_SMALL = %s 杀人王
UNSTOPPABLE_SMALL = %s 势不可挡
MONSTER_SMALL = %s 简直是魔王
GODLIKE_SMALL = %s 如同上帝
VS = 对
HP = 生命
AP = 护甲
C4 = C4爆炸在 %d 秒后
second = -%d 秒
 楼主| 发表于 2009-3-30 12:28:58 | 显示全部楼层 来自 福建厦门
本帖最后由 火飞寒 于 2009-4-3 09:53 编辑

用的是可以显示C4倒数的miscstats.sma,高手帮我看看,怎么会miscstats.txt错误呢?
/* AMX Mod X
*   Misc. Stats Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>
#include <csx>
#include <cstrike>

public MultiKill
public MultiKillSound
public BombPlanting
public BombDefusing
public BombPlanted
public BombDefused
public BombFailed
public BombPickUp
public BombDrop
public BombCountVoice
public BombCountDef
public BombReached
public ItalyBonusKill
public EnemyRemaining
public LastMan
public KnifeKill
public KnifeKillSound
public GrenadeKill
public GrenadeSuicide
public HeadShotKill
public HeadShotKillSound
public RoundCounterSound
public RoundCounter
public KillingStreak
public KillingStreakSound
public DoubleKill
public DoubleKillSound
public PlayerName
public FirstBloodSound

new g_streakKills[33][2]
new g_multiKills[33][2]
new g_C4Timer
new g_Defusing
new g_Planter
new Float:g_LastOmg
new g_LastAnnounce
new g_roundCount
new Float:g_doubleKill
new g_doubleKillId
new g_friend[33]
new g_firstBlood
new g_center1_sync
new g_announce_sync
new g_status_sync
new g_left_sync
new g_bottom_sync
new g_he_sync
new g_roundended
new g_MultiKillMsg[7][] =
{        "MULTI_MSG",
        "ULTRA_MSG",
        "SPREE_MSG",
        "RAMPAGE_MSG" ,
        "UNSTOPPABLE_MSG",
        "MONSTER_MSG",
        "GODLIKE_MSG"
}

new g_Sounds[7][] =
{
        "multikill",
        "ultrakill",
        "killingspree",
        "rampage",
        "unstoppable",
        "monsterkill",
        "godlike"
}
new g_KillingMsg[7][] =
{        "MULTI_SMALL",
        "ULTRA_SMALL",
        "SPREE_SMALL",
        "RAMPAGE_SMALL",
        "UNSTOPPABLE_SMALL",
        "MONSTER_SMALL",
        "GODLIKE_SMALL"
}

new g_KinfeMsg[4][] =
{
        "KNIFE_MSG_1",
        "KNIFE_MSG_2",
        "KNIFE_MSG_3",
        "KNIFE_MSG_4"
}

new g_LastMessages[4][] =
{
        "LAST_MSG_1",
        "LAST_MSG_2",
        "LAST_MSG_3",
        "LAST_MSG_4"
}

new g_HeMessages[4][] =
{
        "HE_MSG_1",
        "HE_MSG_2",
        "HE_MSG_3",
        "HE_MSG_4"
}

new g_SHeMessages[4][] =
{
        "SHE_MSG_1",
        "SHE_MSG_2",
        "SHE_MSG_3",
        "SHE_MSG_4"
}

new g_HeadShots[7][] =
{
        "HS_MSG_1",
        "HS_MSG_2",
        "HS_MSG_3",
        "HS_MSG_4",
        "HS_MSG_5",
        "HS_MSG_6",
        "HS_MSG_7"
}

new g_teamsNames[4][] =
{
        "TERRORIST",
        "CT",
        "TERRORISTS",
        "CTS"
}

public plugin_init()
{
        register_plugin("CS Misc. Stats", AMXX_VERSION_STR, "AMXX Dev Team")
        register_dictionary("common.txt")
        register_dictionary("miscstats.txt")
        register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")
        register_event("SendAudio", "eEndRound", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")
        register_event("RoundTime", "eNewRound", "bc")
        register_event("StatusValue", "setTeam", "be", "1=1")
        register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
        register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")

        new mapname[32]
        get_mapname(mapname, 31)

        if (equali(mapname, "de_", 3) || equali(mapname, "csde_", 5))
        {
                register_event("StatusIcon", "eGotBomb", "be", "1=1", "1=2", "2=c4")
                register_event("TextMsg", "eBombPickUp", "bc", "2&#Got_bomb")
                register_event("TextMsg", "eBombDrop", "bc", "2&#Game_bomb_d")
        }
        else if (equali(mapname, "cs_italy"))
        {
                register_event("23", "chickenKill", "a", "1=108", /*"12=106", */ "15=4")
                register_event("23", "radioKill", "a", "1=108", /*"12=294", */ "15=2")
        }
       
        g_center1_sync = CreateHudSyncObj()
        g_announce_sync = CreateHudSyncObj()
        g_status_sync = CreateHudSyncObj()
        g_left_sync = CreateHudSyncObj()
        g_bottom_sync = CreateHudSyncObj()
        g_he_sync = CreateHudSyncObj()
}

public plugin_cfg()
{
        new g_addStast[] = "amx_statscfg add ^"%s^" %s"
       
        server_cmd(g_addStast, "杀人等级", "MultiKill")
        server_cmd(g_addStast, "杀人等级音效", "MultiKillSound")
        server_cmd(g_addStast, "C4埋放过程", "BombPlanting")
        server_cmd(g_addStast, "C4拆解过程", "BombDefusing")
        server_cmd(g_addStast, "C4被放置", "BombPlanted")
        server_cmd(g_addStast, "C4被成功拆解", "BombDefused")
        server_cmd(g_addStast, "C4拆解失败", "BombFailed")
        server_cmd(g_addStast, "拿到C4", "BombPickUp")
        server_cmd(g_addStast, "C4掉落", "BombDrop")
        server_cmd(g_addStast, "C4倒计时", "BombCountVoice")
        server_cmd(g_addStast, "C4拆解时倒计时", "BombCountDef")
        server_cmd(g_addStast, "到达埋雷点", "BombReached")
        server_cmd(g_addStast, "Italy其他事件", "ItalyBonusKill")
        server_cmd(g_addStast, "最后一人", "LastMan")
        server_cmd(g_addStast, "用刀杀死", "KnifeKill")
        server_cmd(g_addStast, "用刀杀死声效", "KnifeKillSound")
        server_cmd(g_addStast, "手雷杀死", "GrenadeKill")
        server_cmd(g_addStast, "用手雷自杀", "GrenadeSuicide")
        server_cmd(g_addStast, "爆头杀死", "HeadShotKill")
        server_cmd(g_addStast, "爆头杀死声效", "HeadShotKillSound")
        server_cmd(g_addStast, "局数显示", "RoundCounter")
        server_cmd(g_addStast, "局数声效", "RoundCounterSound")
        server_cmd(g_addStast, "杀人技能", "KillingStreak")
        server_cmd(g_addStast, "杀人技能声效", "KillingStreakSound")
        server_cmd(g_addStast, "敌人剩余", "EnemyRemaining")
        server_cmd(g_addStast, "双杀", "DoubleKill")
        server_cmd(g_addStast, "双杀声效", "DoubleKillSound")
        server_cmd(g_addStast, "玩家名字", "PlayerName")
        server_cmd(g_addStast, "第一个杀人", "FirstBloodSound")
}

public client_putinserver(id)
{
        g_multiKills[id] = {0, 0}
        g_streakKills[id] = {0, 0}
}

public client_death(killer, victim, wpnindex, hitplace, TK)
{
        if (wpnindex == CSW_C4)
                return

        new headshot = (hitplace == HIT_HEAD) ? 1 : 0
        new selfkill = (killer == victim) ? 1 : 0

        if (g_firstBlood)
        {
                g_firstBlood = 0
                if (FirstBloodSound)
                        play_sound("misc/firstblood")
        }

        if ((KillingStreak || KillingStreakSound) && !TK)
        {
                g_streakKills[victim][1]++
                g_streakKills[victim][0] = 0

                if (!selfkill)
                {
                        g_streakKills[killer][0]++
                        g_streakKills[killer][1] = 0
                       
                        new a = g_streakKills[killer][0] - 3

                        if ((a > -1) && !(a % 2))
                        {
                                new name[32]
                                get_user_name(killer, name, 31)
                               
                                if ((a >>= 1) > 6)
                                        a = 6
                               
                                if (KillingStreak)
                                {
                                        set_hudmessage(0, 100, 255, 0.05, 0.50, 2, 0.02, 6.0, 0.01, 0.1, -1)
                                        //ShowSyncHudMsg(0, g_left_sync, g_KillingMsg[a], name)
                                        ShowSyncHudMsg(0, g_left_sync, "%L", LANG_PLAYER, g_KillingMsg[a], name)
                                }
                               
                                if (KillingStreakSound)
                                {
                                        new file[32]
                                       
                                        format(file, 31, "misc/%s", g_Sounds[a])
                                        play_sound(file)
                                }
                        }
                }
        }

        if (MultiKill || MultiKillSound)
        {
                if (!selfkill && !TK)
                {
                        g_multiKills[killer][0]++
                        g_multiKills[killer][1] += headshot
                       
                        new param[2]
                       
                        param[0] = killer
                        param[1] = g_multiKills[killer][0]
                        set_task(4.0 + float(param[1]), "checkKills", 0, param, 2)
                }
        }

        if (EnemyRemaining && is_user_connected(victim))
        {
                new ppl[32], pplnum = 0, maxplayers = get_maxplayers()
                new epplnum = 0
                new CsTeams:team = cs_get_user_team(victim)
                new CsTeams:other_team
                new CsTeams:enemy_team = (team == CS_TEAM_T) ? CS_TEAM_CT : CS_TEAM_T
               
                if (team == CS_TEAM_T || team == CS_TEAM_CT)
                {
                        for (new i=1; i<=maxplayers; i++)
                        {
                                if (!is_user_connected(i))
                                {
                                        continue
                                }
                                if (i == victim)
                                {
                                        continue
                                }
                                other_team = cs_get_user_team(i)
                                if (other_team == team && is_user_alive(i))
                                {
                                        epplnum++
                                } else if (other_team == enemy_team) {
                                        ppl[pplnum++] = i
                                }
                        }
                       
                        if (pplnum && epplnum)
                        {
                                new message[128], team_name[32]

                                set_hudmessage(255, 255, 255, 0.02, 0.85, 2, 0.05, 0.1, 0.02, 3.0, -1)
                               
                                /* This is a pretty stupid thing to translate, but whatever */
                                new _teamname[32]
                                if (team == CS_TEAM_T)
                                {
                                        format(_teamname, 31, "TERRORIST%s", (epplnum == 1) ? "" : "S")
                                } else if (team == CS_TEAM_CT) {
                                        format(_teamname, 31, "CT%s", (epplnum == 1) ? "" : "S")
                                }
回复

使用道具 举报

发表于 2009-3-31 12:00:06 | 显示全部楼层 来自 甘肃兰州
你这个还卖钱??
回复

使用道具 举报

发表于 2009-3-31 18:07:24 | 显示全部楼层 来自 福建漳州
用 UltraEdit 将文件保存为 UTF-8无BOM 格式即可。估计你是用Windows的记事本来保存的。
回复

使用道具 举报

 楼主| 发表于 2009-4-1 10:20:49 | 显示全部楼层 来自 福建厦门
本帖最后由 火飞寒 于 2009-4-3 09:54 编辑

for (new a = 0; a < pplnum; ++a)
                                {
                                        format(team_name, 31, "%L", ppl[a], _teamname)
                                        format(message, 127, "%L", ppl[a], "REMAINING", epplnum, team_name)
                                        ShowSyncHudMsg(ppl[a], g_bottom_sync, "%s", message)
                                }
                        }
                }
        }

        if (LastMan)
        {
                new cts[32], ts[32], ctsnum, tsnum
                new maxplayers = get_maxplayers()
                new CsTeams:team
               
                for (new i=1; i<=maxplayers; i++)
                {
                        if (!is_user_connected(i) || !is_user_alive(i))
                        {
                                continue
                        }
                        team = cs_get_user_team(i)
                        if (team == CS_TEAM_T)
                        {
                                ts[tsnum++] = i
                        } else if (team == CS_TEAM_CT) {
                                cts[ctsnum++] = i
                        }
                }
               
                if (ctsnum == 1 && tsnum == 1)
                {
                        new ctname[32], tname[32]
                       
                        get_user_name(cts[0], ctname, 31)
                        get_user_name(ts[0], tname, 31)
                       
                        set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
                        ShowSyncHudMsg(0, g_center1_sync, "%s %L %s", ctname, LANG_PLAYER, "VS", tname)
                       
                        play_sound("misc/maytheforce")
                }
                else if (!g_LastAnnounce)
                {
                        new oposite = 0, _team = 0
                       
                        if (ctsnum == 1 && tsnum > 1)
                        {
                                g_LastAnnounce = cts[0]
                                oposite = tsnum
                                _team = 2  // old: 0
                        }
                        else if (tsnum == 1 && ctsnum > 1)
                        {
                                g_LastAnnounce = ts[0]
                                oposite = ctsnum
                                _team = 3  //old: 1
                        }

                        if (g_LastAnnounce)
                        {
                                new name[32]
                               
                                get_user_name(g_LastAnnounce, name, 31)
                               
                                set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
                                //ShowSyncHudMsg(0, g_center1_sync, "%s (%d HP) %L %d %s%s: %L", name, get_user_health(g_LastAnnounce), LANG_PLAYER, "VS", oposite, g_teamsNames[_team], (oposite == 1) ? "" : "S", LANG_PLAYER, g_LastMessages[random_num(0, 3)])
                                ShowSyncHudMsg(0, g_center1_sync, "%s (%d %L) %L %d %L: %L", name, get_user_health(g_LastAnnounce),LANG_PLAYER, "HP", LANG_PLAYER, "VS", oposite, LANG_PLAYER, g_teamsNames[_team], LANG_PLAYER, g_LastMessages[random_num(0, 3)])
                                if (!is_user_connecting(g_LastAnnounce))
                                {
                                        client_cmd(g_LastAnnounce, "spk misc/oneandonly")
                                }
                        }
                }
        }

        if (wpnindex == CSW_KNIFE && (KnifeKill || KnifeKillSound))
        {
                if (KnifeKill)
                {
                        new killer_name[32], victim_name[32]
                       
                        get_user_name(killer, killer_name, 31)
                        get_user_name(victim, victim_name, 31)
                       
                        set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)
                        ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_KinfeMsg[random_num(0, 3)], killer_name, victim_name)
                }
               
                if (KnifeKillSound)
                        play_sound("misc/humiliation")
        }

        if (wpnindex == CSW_HEGRENADE && (GrenadeKill || GrenadeSuicide))
        {
                new killer_name[32], victim_name[32]
               
                get_user_name(killer, killer_name, 31)
                get_user_name(victim, victim_name, 31)
               
                set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)
               
                if (!selfkill)
                {
                        if (GrenadeKill)
                                ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_HeMessages[random_num(0, 3)], killer_name, victim_name)
                }
                else if (GrenadeSuicide)
                        ShowSyncHudMsg(0, g_he_sync, "%L", LANG_PLAYER, g_SHeMessages[random_num(0, 3)], victim_name)
        }

        if (headshot && (HeadShotKill || HeadShotKillSound))
        {
                if (HeadShotKill && wpnindex)
                {
                        new killer_name[32], victim_name[32], weapon_name[32], message[128], players[32], pnum
                       
                        xmod_get_wpnname(wpnindex, weapon_name, 31)
                        get_user_name(killer, killer_name, 31)
                        get_user_name(victim, victim_name, 31)
                        get_players(players, pnum, "c")
                       
                        for (new i = 0; i < pnum; i++)
                        {
                                format(message, 127, "%L", players, g_HeadShots[random_num(0, 6)])
                               
                                replace(message, 127, "$vn", victim_name)
                                replace(message, 127, "$wn", weapon_name)
                                replace(message, 127, "$kn", killer_name)
                               
                                set_hudmessage(100, 100, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)
                                ShowSyncHudMsg(players, g_announce_sync, "%s", message)
                        }
                }
               
                if (HeadShotKillSound)
                {
                        client_cmd(killer, "spk misc/headshot")
                        client_cmd(victim, "spk misc/headshot")
                }
        }

        if ((DoubleKill || DoubleKillSound) && !selfkill)
        {
                new Float:nowtime = get_gametime()
               
                if (g_doubleKill == nowtime && g_doubleKillId == killer)
                {
                        if (DoubleKill)
                        {
                                new name[32]
                               
                                get_user_name(killer, name, 31)
                               
                                set_hudmessage(255, 0, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
                                ShowSyncHudMsg(0, g_center1_sync, "%L", LANG_PLAYER, "DOUBLE_KILL", name)
                        }
                       
                        if (DoubleKillSound)
                                play_sound("misc/doublekill")
                }
               
                g_doubleKill = nowtime
                g_doubleKillId = killer
        }
}

public hideStatus(id)
{
        if (PlayerName)
        {
                ClearSyncHud(id, g_status_sync)
        }
}

public setTeam(id)
        g_friend[id] = read_data(2)

public showStatus(id)
{
        if (PlayerName)
        {
                new name[32], pid = read_data(2)
               
                get_user_name(pid, name, 31)
                new color1 = 0, color2 = 0
               
                if (get_user_team(pid) == 1)
                        color1 = 255
                else
                        color2 = 255
                       
                if (g_friend[id] == 1)        // friend
                {
                        new clip, ammo, wpnid = get_user_weapon(pid, clip, ammo)
                        new wpnname[32]
                       
                        if (wpnid)
                                xmod_get_wpnname(wpnid, wpnname, 31)
                       
                        set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01)
                        ShowSyncHudMsg(id, g_status_sync, "%s -- %d %L / %d %L / %s", name, get_user_health(pid), id, "HP", get_user_armor(pid), id, "AP", wpnname)
                } else {
                        set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01)
                        ShowSyncHudMsg(id, g_status_sync, "%s", name)
                }
        }
}

public eNewRound()
{
        if (read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0))
        {
                g_roundended = 0  //This line is added by Rluzy
                g_firstBlood = 1
                g_C4Timer = 0
                ++g_roundCount
               
                if (RoundCounter)
                {
                        set_hudmessage(200, 0, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)
                        ShowSyncHudMsg(0, g_announce_sync, "%L", LANG_PLAYER, "PREPARE_FIGHT", g_roundCount)
                }
               
                if (RoundCounterSound)
                        play_sound("misc/prepare")
               
                if (KillingStreak)
                {
                        new appl[32], ppl, i
                        get_players(appl, ppl, "ac")
                       
                        for (new a = 0; a < ppl; ++a)
                        {
                                i = appl[a]
                               
                                if (g_streakKills[0] >= 2)
                                        client_print(i, print_chat, "* %L", i, "KILLED_ROW", g_streakKills[0])
                                else if (g_streakKills[1] >= 2)
                                        client_print(i, print_chat, "* %L", i, "DIED_ROUNDS", g_streakKills[1])
                        }
                }
        }
}

/* added by Rulzy */
public reset_roundcounter()
{
        g_roundCount = 0
}
/* modified by Rulzy ended */

public eRestart()
{
        eEndRound()
        g_roundCount = 0
        g_firstBlood = 1
        /* added by Rulzy */
        new time=read_data(3)
        new freezetime=get_cvar_num("mp_freezetime")
        remove_task(39023)
        set_task(time+freezetime-0.5,"reset_roundcounter",39023)
        /* modified by Rulzy ended */
}

public eEndRound()
{
        g_C4Timer = -2
        g_roundended = 1  //This line is added by Rluzy
        g_LastOmg = 0.0
        remove_task(8038)
        g_LastAnnounce = 0
}
回复

使用道具 举报

发表于 2009-4-3 06:08:09 | 显示全部楼层 来自 广东茂名
还卖钱。。下次想帮你都难了。。好在R版好人。。顶一个
回复

使用道具 举报

 楼主| 发表于 2009-4-3 09:55:07 | 显示全部楼层 来自 福建厦门
  1. public checkKills(param[])
  2. {
  3.         new id = param[0]
  4.         new a = param[1]
  5.        
  6.         if (a == g_multiKills[id][0])
  7.         {
  8.                 a -= 3
  9.                
  10.                 if (a > -1)
  11.                 {
  12.                         if (a > 6)
  13.                         {
  14.                                 a = 6
  15.                         }
  16.                        
  17.                         if (MultiKill)
  18.                         {
  19.                                 new name[32]
  20.                                
  21.                                 get_user_name(id, name, 31)
  22.                                 set_hudmessage(255, 0, 100, 0.05, 0.50, 2, 0.02, 6.0, 0.01, 0.1, -1)
  23.                                
  24.                                 //ShowSyncHudMsg(0, g_left_sync, g_MultiKillMsg[a], name, LANG_PLAYER, "WITH", g_multiKills[id][0], LANG_PLAYER, "KILLS", g_multiKills[id][1], LANG_PLAYER, "HS")
  25.                                 ShowSyncHudMsg(0, g_left_sync, "%L^n%L %d %L (%d %L)", LANG_PLAYER, g_MultiKillMsg[a], name, LANG_PLAYER, "WITH", g_multiKills[id][0], LANG_PLAYER, "KILLS", g_multiKills[id][1], LANG_PLAYER, "HS")
  26.                         }
  27.                        
  28.                         if (MultiKillSound)
  29.                         {
  30.                                 new sound[24]
  31.                                 format(sound, 23, "misc/%s", g_Sounds[a])
  32.                                 play_sound(sound)
  33.                         }
  34.                 }
  35.                 g_multiKills[id] = {0, 0}
  36.         }
  37. }

  38. public chickenKill()
  39.         if (ItalyBonusKill)
  40.                 announceEvent(0, "KILLED_CHICKEN")

  41. public radioKill()
  42. {
  43.         if (ItalyBonusKill)
  44.                 announceEvent(0, "BLEW_RADIO")
  45. }

  46. announceEvent(id, message[])
  47. {
  48.         new name[32]
  49.        
  50.         get_user_name(id, name, 31)
  51.         set_hudmessage(255, 100, 50, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)
  52.         ShowSyncHudMsg(0, g_announce_sync, "%L", LANG_PLAYER, message, name)
  53. }

  54. public eBombPickUp(id)
  55.         if (BombPickUp)
  56.                 announceEvent(id, "PICKED_BOMB")

  57. public eBombDrop()
  58.         if (BombDrop)
  59.                 announceEvent(g_Planter, "DROPPED_BOMB")

  60. public eGotBomb(id)
  61. {
  62.         g_Planter = id
  63.        
  64.         if (BombReached && read_data(1) == 2 && g_LastOmg < get_gametime())
  65.         {
  66.                 g_LastOmg = get_gametime() + 15.0
  67.                 announceEvent(g_Planter, "REACHED_TARGET")
  68.         }
  69. }

  70. public bombTimer()
  71. {
  72.         if (--g_C4Timer > 0)
  73.         {
  74.                 if (BombCountVoice)
  75.                 {
  76.                         if (g_C4Timer == 30 || g_C4Timer == 20)
  77.                         {
  78.                                 new temp[64]
  79.                                
  80.                                 num_to_word(g_C4Timer, temp, 63)
  81.                                 format(temp, 63, "^"vox/%s seconds until explosion^"", temp)
  82.                                 play_sound(temp)
  83.                         }
  84.                         else if (g_C4Timer < 11)
  85.                         {
  86.                                 new temp[64]
  87.                                
  88.                                 num_to_word(g_C4Timer, temp, 63)
  89.                                 format(temp, 63, "^"vox/%s^"", temp)
  90.                                 play_sound(temp)
  91.                         }
  92.                 }  

  93.                 if (BombCountDef){

  94.                                 if(g_Defusing){                // 正解时... C4 倒数   //对解炸弹人倒数,0表示所有人(g_Defusing),1表示解炸弹人
  95.                                         if (g_C4Timer < 11)        //后10秒
  96.                                                 client_print(0, print_center, "%L", LANG_PLAYER, "second", g_C4Timer)
  97.                                         else
  98.                                                 client_print(0, print_center, "%L", LANG_PLAYER, "C4", g_C4Timer)
  99.                                 }
  100.                                 else{                                                        // 没有解时... C4 倒数
  101.                                         if (g_C4Timer < 11)        //后10秒
  102.                                                 client_print(0, print_center, "%L", LANG_PLAYER, "second", g_C4Timer)        //second = -%d秒
  103.                                         else
  104.                                                 client_print(0, print_center, "%L", LANG_PLAYER, "C4", g_C4Timer)                        //C4 = C4爆炸: -%d 秒
  105.                                 }
  106.                 }
  107.         }
  108.         else
  109.                 remove_task(8038)
  110. }

  111. public bomb_planted(planter)
  112. {
  113.         g_Defusing = 0
  114.        
  115.         if (BombPlanted)
  116.                 announceEvent(planter, "SET_UP_BOMB")
  117.                
  118.         if(g_roundended) return    //This line is added by Rluzy
  119.        
  120.         g_C4Timer = get_cvar_num("mp_c4timer")
  121.         set_task(1.0, "bombTimer", 8038, "", 0, "b")
  122. }

  123. public bomb_planting(planter)
  124.         if (BombPlanting)
  125.                 announceEvent(planter, "PLANT_BOMB")

  126. public bomb_defusing(defuser)
  127. {
  128.         if (BombDefusing)
  129.                 announceEvent(defuser, "DEFUSING_BOMB")
  130.        
  131.         g_Defusing = defuser
  132. }

  133. public bomb_defused(defuser)
  134.         if (BombDefused)
  135.                 announceEvent(defuser, "DEFUSED_BOMB")

  136. public bomb_explode(planter, defuser)
  137.         if (BombFailed && defuser)
  138.                 announceEvent(defuser, "FAILED_DEFU")

  139. public play_sound(sound[])
  140. {
  141.         new players[32], pnum
  142.         get_players(players, pnum, "c")
  143.         new i
  144.        
  145.         for (i = 0; i < pnum; i++)
  146.         {
  147.                 if (is_user_connecting(players[i]))
  148.                         continue
  149.                
  150.                 client_cmd(players[i], "spk %s", sound)
  151.         }
  152. }
复制代码
回复

使用道具 举报

 楼主| 发表于 2009-4-3 09:56:56 | 显示全部楼层 来自 福建厦门
版主、高手们到底哪里有问题?已经保存成UTF-8模式了
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表