Final score -- Team A: %d Team B: %d
", body, g_iTeamScore[0], g_iTeamScore[1])
format(body, charsmax(body), "%s%-22s %5s %6s^n", body, "Player", "Kills", "Deaths")
new players[32], num
get_players(players, num)
for (new i = 0; i < num; i++)
{
new pid = players[i]
new name[24]
get_user_name(pid, name, charsmax(name))
formatex(line, charsmax(line), "%-22s %5d %6d^n", name, g_iKills[pid], g_iDeaths[pid])
add(body, charsmax(body), line)
}
add(body, charsmax(body), "")
for (new i = 0; i < num; i++)
show_motd(players[i], body, "Match Summary")
}
public cmdScore(id)
{
if (g_iState == MS_OFF)
{
client_print(id, print_chat, "[Match] No match is running.")
return PLUGIN_HANDLED
}
client_print(id, print_chat, "[Match] Team A: %d Team B: %d (round %d, MR%d)", g_iTeamScore[0], g_iTeamScore[1], g_iRoundsPlayed, g_iMaxRounds)
return PLUGIN_HANDLED
}
resetStats()
{
for (new i = 1; i <= 32; i++)
{
g_iKills[i] = 0
g_iDeaths[i] = 0
}
}
public taskHud()
{
if (g_iState == MS_OFF)
return
new stateName[24]
switch (g_iState)
{
case MS_KNIFE: copy(stateName, charsmax(stateName), "KNIFE ROUND")
case MS_PICK: copy(stateName, charsmax(stateName), "SIDE PICK")
case MS_LIVE: copy(stateName, charsmax(stateName), "LIVE")
case MS_END: copy(stateName, charsmax(stateName), "FINISHED")
default: copy(stateName, charsmax(stateName), "MATCH")
}
set_hudmessage(255, 200, 0, 0.02, 0.02, 0, 0.0, 1.1, 0.0, 0.0, -1)
show_hudmessage(0, "[%s] A %d : %d B (MR%d)", stateName, g_iTeamScore[0], g_iTeamScore[1], g_iMaxRounds)
}
announce(const fmt[], any:...)
{
new msg[192]
vformat(msg, charsmax(msg), fmt, 2)
new players[32], num, msgid = get_user_msgid("SayText")
get_players(players, num, "ch")
for (new i = 0; i < num; i++)
{
message_begin(MSG_ONE, msgid, _, players[i])
write_byte(players[i])
write_string(msg)
message_end()
}
}