|
楼主 |
发表于 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
} |
|