StatsX: Switch format to formatex
This commit is contained in:
parent
3e1de6b014
commit
297ced77b9
|
@ -299,7 +299,7 @@ public cmdHudTest(id)
|
|||
iLen = 0
|
||||
|
||||
for (i = 1; i < 20; i++)
|
||||
iLen += format(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "....x....1....x....2....x....3....x....4....x....^n")
|
||||
iLen += formatex(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "....x....1....x....2....x....3....x....4....x....^n")
|
||||
|
||||
set_hudtype_killer(50.0)
|
||||
show_hudmessage(id, "%s", g_sBuffer)
|
||||
|
@ -380,10 +380,10 @@ get_attackers(id, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
if (izStats[STATS_SHOTS] && ShowFullStats)
|
||||
{
|
||||
get_user_name(iAttacker, t_sName, MAX_NAME_LENGTH)
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "%L -- %s -- %0.2f%% %L:^n", id, "ATTACKERS", t_sName, accuracy(izStats), id, "ACC")
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "%L -- %s -- %0.2f%% %L:^n", id, "ATTACKERS", t_sName, accuracy(izStats), id, "ACC")
|
||||
}
|
||||
else
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "%L:^n", id, "ATTACKERS")
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "%L:^n", id, "ATTACKERS")
|
||||
|
||||
// Get and format attacker list.
|
||||
for (iAttacker = 1; iAttacker <= iMaxPlayer; iAttacker++)
|
||||
|
@ -396,17 +396,17 @@ get_attackers(id, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
if (izStats[STATS_KILLS])
|
||||
{
|
||||
if (!ShowDistHS)
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
izStats[STATS_DAMAGE], id, "DMG", t_sWpn)
|
||||
else if (izStats[STATS_HS])
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s / %0.0f m / HS^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s / %0.0f m / HS^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
izStats[STATS_DAMAGE], id, "DMG", t_sWpn, distance(g_izUserAttackerDistance[id]))
|
||||
else
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s / %0.0f m^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s / %0.0f m^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
izStats[STATS_DAMAGE], id, "DMG", t_sWpn, distance(g_izUserAttackerDistance[id]))
|
||||
}
|
||||
else
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L^n", t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG")
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L^n", t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -434,9 +434,9 @@ get_victims(id, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
get_user_vstats(id, 0, izStats, izBody)
|
||||
|
||||
if (izStats[STATS_SHOTS])
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "%L -- %0.2f%% %L:^n", id, "VICTIMS", accuracy(izStats), id, "ACC")
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "%L -- %0.2f%% %L:^n", id, "VICTIMS", accuracy(izStats), id, "ACC")
|
||||
else
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "%L:^n", id, "VICTIMS")
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "%L:^n", id, "VICTIMS")
|
||||
|
||||
for (iVictim = 1; iVictim <= iMaxPlayer; iVictim++)
|
||||
{
|
||||
|
@ -448,17 +448,17 @@ get_victims(id, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
if (izStats[STATS_DEATHS])
|
||||
{
|
||||
if (!ShowDistHS)
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
izStats[STATS_DAMAGE], id, "DMG", t_sWpn)
|
||||
else if (izStats[STATS_HS])
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s / %0.0f m / HS^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s / %0.0f m / HS^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
izStats[STATS_DAMAGE], id, "DMG", t_sWpn, distance(g_izUserVictimDistance[id][iVictim]))
|
||||
else
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s / %0.0f m^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L / %s / %0.0f m^n", t_sName, izStats[STATS_HITS], id, "HIT_S",
|
||||
izStats[STATS_DAMAGE], id, "DMG", t_sWpn, distance(g_izUserVictimDistance[id][iVictim]))
|
||||
}
|
||||
else
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L^n", t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG")
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%s -- %d %L / %d %L^n", t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -492,9 +492,9 @@ get_kill_info(id, iKiller, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
izVStats[STATS_DAMAGE] = 0
|
||||
get_user_vstats(id, iKiller, izVStats, iaVBody)
|
||||
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "%L^n", id, "KILLED_YOU_DIST", t_sName, t_sWpn, distance(g_izUserAttackerDistance[id]))
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L^n", id, "DID_DMG_HITS", izAStats[STATS_DAMAGE], izAStats[STATS_HITS], g_izKilled[id][KILLED_KILLER_HEALTH], g_izKilled[id][KILLED_KILLER_ARMOUR])
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L^n", id, "YOU_DID_DMG", izVStats[STATS_DAMAGE], izVStats[STATS_HITS])
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "%L^n", id, "KILLED_YOU_DIST", t_sName, t_sWpn, distance(g_izUserAttackerDistance[id]))
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L^n", id, "DID_DMG_HITS", izAStats[STATS_DAMAGE], izAStats[STATS_HITS], g_izKilled[id][KILLED_KILLER_HEALTH], g_izKilled[id][KILLED_KILLER_ARMOUR])
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L^n", id, "YOU_DID_DMG", izVStats[STATS_DAMAGE], izVStats[STATS_HITS])
|
||||
}
|
||||
|
||||
return iFound
|
||||
|
@ -528,7 +528,7 @@ add_most_disruptive(sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
new Float:fGameEff = effec(g_izUserGameStats[id])
|
||||
new Float:fRndAcc = accuracy(g_izUserRndStats[id])
|
||||
|
||||
format(t_sText, MAX_TEXT_LENGTH, "%L: %s^n%d %L / %d %L -- %0.2f%% %L / %0.2f%% %L^n", LANG_SERVER, "MOST_DMG", g_izUserRndName[id],
|
||||
formatex(t_sText, MAX_TEXT_LENGTH, "%L: %s^n%d %L / %d %L -- %0.2f%% %L / %0.2f%% %L^n", LANG_SERVER, "MOST_DMG", g_izUserRndName[id],
|
||||
g_izUserRndStats[id][STATS_HITS], LANG_SERVER, "HIT_S", iMaxDamage, LANG_SERVER, "DMG", fGameEff, LANG_SERVER, "EFF", fRndAcc, LANG_SERVER, "ACC")
|
||||
add(sBuffer, MAX_BUFFER_LENGTH, t_sText)
|
||||
}
|
||||
|
@ -564,7 +564,7 @@ add_best_score(sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
new Float:fGameEff = effec(g_izUserGameStats[id])
|
||||
new Float:fRndAcc = accuracy(g_izUserRndStats[id])
|
||||
|
||||
format(t_sText, MAX_TEXT_LENGTH, "%L: %s^n%d %L / %d hs -- %0.2f%% %L / %0.2f%% %L^n", LANG_SERVER, "BEST_SCORE", g_izUserRndName[id],
|
||||
formatex(t_sText, MAX_TEXT_LENGTH, "%L: %s^n%d %L / %d hs -- %0.2f%% %L / %0.2f%% %L^n", LANG_SERVER, "BEST_SCORE", g_izUserRndName[id],
|
||||
iMaxKills, LANG_SERVER, "KILL_S", iMaxHeadShots, fGameEff, LANG_SERVER, "EFF", fRndAcc, LANG_SERVER, "ACC")
|
||||
add(sBuffer, MAX_BUFFER_LENGTH, t_sText)
|
||||
}
|
||||
|
@ -586,7 +586,7 @@ add_team_score(sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
}
|
||||
|
||||
// Format round team stats, MOTD
|
||||
format(t_sText, MAX_TEXT_LENGTH, "TERRORIST %d / %0.2f%% %L / %0.2f%% %L^nCT %d / %0.2f%% %L / %0.2f%% %L^n", g_izTeamScore[0],
|
||||
formatex(t_sText, MAX_TEXT_LENGTH, "TERRORIST %d / %0.2f%% %L / %0.2f%% %L^nCT %d / %0.2f%% %L / %0.2f%% %L^n", g_izTeamScore[0],
|
||||
fzMapEff[0], LANG_SERVER, "EFF", fzRndAcc[0], LANG_SERVER, "ACC", g_izTeamScore[1], fzMapEff[1], LANG_SERVER, "EFF", fzRndAcc[1], LANG_SERVER, "ACC")
|
||||
add(sBuffer, MAX_BUFFER_LENGTH, t_sText)
|
||||
}
|
||||
|
@ -605,14 +605,14 @@ save_team_chatscore()
|
|||
}
|
||||
|
||||
// Format game team stats, chat
|
||||
format(g_sScore, MAX_BUFFER_LENGTH, "TERRORIST %d / %0.2f%% %L / %0.2f%% %L -- CT %d / %0.2f%% %L / %0.2f%% %L", g_izTeamScore[0],
|
||||
formatex(g_sScore, MAX_BUFFER_LENGTH, "TERRORIST %d / %0.2f%% %L / %0.2f%% %L -- CT %d / %0.2f%% %L / %0.2f%% %L", g_izTeamScore[0],
|
||||
fzMapEff[0], LANG_SERVER, "EFF", fzMapAcc[0], LANG_SERVER, "ACC", g_izTeamScore[1], fzMapEff[1], LANG_SERVER, "EFF", fzMapAcc[1], LANG_SERVER, "ACC")
|
||||
}
|
||||
|
||||
// Get and format total stats.
|
||||
add_total_stats(sBuffer[MAX_BUFFER_LENGTH + 1])
|
||||
{
|
||||
format(t_sText, MAX_TEXT_LENGTH, "%L: %d %L / %d hs -- %d %L / %d %L^n", LANG_SERVER, "TOTAL", g_izUserRndStats[0][STATS_KILLS], LANG_SERVER, "KILL_S",
|
||||
formatex(t_sText, MAX_TEXT_LENGTH, "%L: %d %L / %d hs -- %d %L / %d %L^n", LANG_SERVER, "TOTAL", g_izUserRndStats[0][STATS_KILLS], LANG_SERVER, "KILL_S",
|
||||
g_izUserRndStats[0][STATS_HS], g_izUserRndStats[0][STATS_HITS], LANG_SERVER, "HITS", g_izUserRndStats[0][STATS_SHOTS], LANG_SERVER, "SHOT_S")
|
||||
add(sBuffer, MAX_BUFFER_LENGTH, t_sText)
|
||||
}
|
||||
|
@ -635,14 +635,14 @@ add_attacker_hits(id, iAttacker, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
iLen = strlen(sBuffer)
|
||||
get_user_name(iAttacker, t_sName, MAX_NAME_LENGTH)
|
||||
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L:^n", id, "HITS_YOU_IN", t_sName)
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L:^n", id, "HITS_YOU_IN", t_sName)
|
||||
|
||||
for (new i = 1; i < 8; i++)
|
||||
{
|
||||
if (!izBody[i])
|
||||
continue
|
||||
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L: %d^n", id, BODY_PART[i], izBody[i])
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L: %d^n", id, BODY_PART[i], izBody[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ format_kill_ainfo(id, iKiller, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
izStats[STATS_HITS] = 0
|
||||
get_user_astats(id, iKiller, izStats, izBody, t_sWpn, MAX_WEAPON_LENGTH)
|
||||
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "%L (%dhp, %dap) >>", id, "KILLED_BY_WITH", t_sName, t_sWpn, distance(g_izUserAttackerDistance[id]),
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "%L (%dhp, %dap) >>", id, "KILLED_BY_WITH", t_sName, t_sWpn, distance(g_izUserAttackerDistance[id]),
|
||||
g_izKilled[id][KILLED_KILLER_HEALTH], g_izKilled[id][KILLED_KILLER_ARMOUR])
|
||||
|
||||
if (izStats[STATS_HITS])
|
||||
|
@ -675,14 +675,14 @@ format_kill_ainfo(id, iKiller, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
if (!izBody[i])
|
||||
continue
|
||||
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, " %L: %d", id, BODY_PART[i], izBody[i])
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, " %L: %d", id, BODY_PART[i], izBody[i])
|
||||
}
|
||||
}
|
||||
else
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, " %L", id, "NO_HITS")
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, " %L", id, "NO_HITS")
|
||||
}
|
||||
else
|
||||
format(sBuffer, MAX_BUFFER_LENGTH, "%L", id, "YOU_NO_KILLER")
|
||||
formatex(sBuffer, MAX_BUFFER_LENGTH, "%L", id, "YOU_NO_KILLER")
|
||||
|
||||
return iFound
|
||||
}
|
||||
|
@ -703,10 +703,10 @@ format_kill_vinfo(id, iKiller, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
{
|
||||
iFound = 1
|
||||
get_user_name(iKiller, t_sName, MAX_NAME_LENGTH)
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "%L >>", id, "YOU_HIT", t_sName, izStats[STATS_HITS], izStats[STATS_DAMAGE])
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "%L >>", id, "YOU_HIT", t_sName, izStats[STATS_HITS], izStats[STATS_DAMAGE])
|
||||
}
|
||||
else
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "%L >>", id, "LAST_RES", izStats[STATS_HITS], izStats[STATS_DAMAGE])
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "%L >>", id, "LAST_RES", izStats[STATS_HITS], izStats[STATS_DAMAGE])
|
||||
|
||||
if (izStats[STATS_HITS])
|
||||
{
|
||||
|
@ -715,11 +715,11 @@ format_kill_vinfo(id, iKiller, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
if (!izBody[i])
|
||||
continue
|
||||
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, " %L: %d", id, BODY_PART[i], izBody[i])
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, " %L: %d", id, BODY_PART[i], izBody[i])
|
||||
}
|
||||
}
|
||||
else
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, " %L", id, "NO_HITS")
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, " %L", id, "NO_HITS")
|
||||
|
||||
return iFound
|
||||
}
|
||||
|
@ -736,25 +736,25 @@ format_top15(sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
|
||||
new lKills[16], lDeaths[16], lHits[16], lShots[16], lEff[16], lAcc[16]
|
||||
|
||||
format(lKills, 15, "%L", LANG_SERVER, "KILLS")
|
||||
format(lDeaths, 15, "%L", LANG_SERVER, "DEATHS")
|
||||
format(lHits, 15, "%L", LANG_SERVER, "HITS")
|
||||
format(lShots, 15, "%L", LANG_SERVER, "SHOTS")
|
||||
format(lEff, 15, "%L", LANG_SERVER, "EFF")
|
||||
format(lAcc, 15, "%L", LANG_SERVER, "ACC")
|
||||
formatex(lKills, 15, "%L", LANG_SERVER, "KILLS")
|
||||
formatex(lDeaths, 15, "%L", LANG_SERVER, "DEATHS")
|
||||
formatex(lHits, 15, "%L", LANG_SERVER, "HITS")
|
||||
formatex(lShots, 15, "%L", LANG_SERVER, "SHOTS")
|
||||
formatex(lEff, 15, "%L", LANG_SERVER, "EFF")
|
||||
formatex(lAcc, 15, "%L", LANG_SERVER, "ACC")
|
||||
|
||||
ucfirst(lEff)
|
||||
ucfirst(lAcc)
|
||||
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "<meta charset=utf-8><body bgcolor=#000000><font color=#FFB000><pre>")
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%2s %-22.22s %6s %6s %6s %6s %4s %4s %4s^n", "#", "Nick", lKills, lDeaths, lHits, lShots, "HS", lEff, lAcc)
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "<meta charset=utf-8><body bgcolor=#000000><font color=#FFB000><pre>")
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%2s %-22.22s %6s %6s %6s %6s %4s %4s %4s^n", "#", "Nick", lKills, lDeaths, lHits, lShots, "HS", lEff, lAcc)
|
||||
|
||||
for (new i = 0; i < iMax && MAX_BUFFER_LENGTH - iLen > 0; i++)
|
||||
{
|
||||
get_stats(i, izStats, izBody, t_sName, MAX_NAME_LENGTH)
|
||||
replace_all(t_sName, MAX_NAME_LENGTH, "<", "[")
|
||||
replace_all(t_sName, MAX_NAME_LENGTH, ">", "]")
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%2d %-22.22s %6d %6d %6d %6d %4d %3.0f%% %3.0f%%^n", i + 1, t_sName, izStats[STATS_KILLS],
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%2d %-22.22s %6d %6d %6d %6d %4d %3.0f%% %3.0f%%^n", i + 1, t_sName, izStats[STATS_KILLS],
|
||||
izStats[STATS_DEATHS], izStats[STATS_HITS], izStats[STATS_SHOTS], izStats[STATS_HS], effec(izStats), accuracy(izStats))
|
||||
}
|
||||
}
|
||||
|
@ -767,21 +767,21 @@ format_rankstats(id, sBuffer[MAX_BUFFER_LENGTH + 1], iMyId = 0)
|
|||
new iRankPos, iLen
|
||||
new lKills[16], lDeaths[16], lHits[16], lShots[16], lDamage[16], lEff[16], lAcc[16]
|
||||
|
||||
format(lKills, 15, "%L", id, "KILLS")
|
||||
format(lDeaths, 15, "%L", id, "DEATHS")
|
||||
format(lHits, 15, "%L", id, "HITS")
|
||||
format(lShots, 15, "%L", id, "SHOTS")
|
||||
format(lDamage, 15, "%L", id, "DAMAGE")
|
||||
format(lEff, 15, "%L", id, "EFF")
|
||||
format(lAcc, 15, "%L", id, "ACC")
|
||||
formatex(lKills, 15, "%L", id, "KILLS")
|
||||
formatex(lDeaths, 15, "%L", id, "DEATHS")
|
||||
formatex(lHits, 15, "%L", id, "HITS")
|
||||
formatex(lShots, 15, "%L", id, "SHOTS")
|
||||
formatex(lDamage, 15, "%L", id, "DAMAGE")
|
||||
formatex(lEff, 15, "%L", id, "EFF")
|
||||
formatex(lAcc, 15, "%L", id, "ACC")
|
||||
|
||||
ucfirst(lEff)
|
||||
ucfirst(lAcc)
|
||||
|
||||
iRankPos = get_user_stats(id, izStats, izBody)
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "<body bgcolor=#000000><font color=#FFB000><pre>")
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L %L^n^n", id, (!iMyId || iMyId == id) ? "YOUR" : "PLAYERS", id, "RANK_IS", iRankPos, get_statsnum())
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%6s: %d (%d with hs)^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %0.2f%%^n%6s: %0.2f%%^n^n",
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "<body bgcolor=#000000><font color=#FFB000><pre>")
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%L %L^n^n", id, (!iMyId || iMyId == id) ? "YOUR" : "PLAYERS", id, "RANK_IS", iRankPos, get_statsnum())
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%6s: %d (%d with hs)^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %0.2f%%^n%6s: %0.2f%%^n^n",
|
||||
lKills, izStats[STATS_KILLS], izStats[STATS_HS], lDeaths, izStats[STATS_DEATHS], lHits, izStats[STATS_HITS], lShots, izStats[STATS_SHOTS],
|
||||
lDamage, izStats[STATS_DAMAGE], lEff, effec(izStats), lAcc, accuracy(izStats))
|
||||
|
||||
|
@ -789,10 +789,10 @@ format_rankstats(id, sBuffer[MAX_BUFFER_LENGTH + 1], iMyId = 0)
|
|||
|
||||
for (new i = 1; i < 8; i++)
|
||||
{
|
||||
format(L_BODY_PART[i], 31, "%L", id, BODY_PART[i])
|
||||
formatex(L_BODY_PART[i], 31, "%L", id, BODY_PART[i])
|
||||
}
|
||||
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%10s:^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d", "HITS",
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%10s:^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d^n%10s: %d", "HITS",
|
||||
L_BODY_PART[1], izBody[1], L_BODY_PART[2], izBody[2], L_BODY_PART[3], izBody[3], L_BODY_PART[4], izBody[4], L_BODY_PART[5],
|
||||
izBody[5], L_BODY_PART[6], izBody[6], L_BODY_PART[7], izBody[7])
|
||||
}
|
||||
|
@ -805,32 +805,32 @@ format_stats(id, sBuffer[MAX_BUFFER_LENGTH + 1])
|
|||
new iWeapon, iLen
|
||||
new lKills[16], lDeaths[16], lHits[16], lShots[16], lDamage[16], lEff[16], lAcc[16], lWeapon[16]
|
||||
|
||||
format(lKills, 15, "%L", id, "KILLS")
|
||||
format(lDeaths, 15, "%L", id, "DEATHS")
|
||||
format(lHits, 15, "%L", id, "HITS")
|
||||
format(lShots, 15, "%L", id, "SHOTS")
|
||||
format(lDamage, 15, "%L", id, "DAMAGE")
|
||||
format(lEff, 15, "%L", id, "EFF")
|
||||
format(lAcc, 15, "%L", id, "ACC")
|
||||
format(lWeapon, 15, "%L", id, "WEAPON")
|
||||
formatex(lKills, 15, "%L", id, "KILLS")
|
||||
formatex(lDeaths, 15, "%L", id, "DEATHS")
|
||||
formatex(lHits, 15, "%L", id, "HITS")
|
||||
formatex(lShots, 15, "%L", id, "SHOTS")
|
||||
formatex(lDamage, 15, "%L", id, "DAMAGE")
|
||||
formatex(lEff, 15, "%L", id, "EFF")
|
||||
formatex(lAcc, 15, "%L", id, "ACC")
|
||||
formatex(lWeapon, 15, "%L", id, "WEAPON")
|
||||
|
||||
ucfirst(lEff)
|
||||
ucfirst(lAcc)
|
||||
|
||||
get_user_wstats(id, 0, izStats, izBody)
|
||||
|
||||
iLen = format(sBuffer, MAX_BUFFER_LENGTH, "<body bgcolor=#000000><font color=#FFB000><pre>")
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%6s: %d (%d with hs)^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %0.2f%%^n%6s: %0.2f%%^n^n",
|
||||
iLen = formatex(sBuffer, MAX_BUFFER_LENGTH, "<body bgcolor=#000000><font color=#FFB000><pre>")
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%6s: %d (%d with hs)^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %d^n%6s: %0.2f%%^n%6s: %0.2f%%^n^n",
|
||||
lKills, izStats[STATS_KILLS], izStats[STATS_HS], lDeaths, izStats[STATS_DEATHS], lHits, izStats[STATS_HITS], lShots, izStats[STATS_SHOTS],
|
||||
lDamage, izStats[STATS_DAMAGE], lEff, effec(izStats), lAcc, accuracy(izStats))
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%-12.12s %6s %6s %6s %6s %6s %4s^n", lWeapon, lKills, lDeaths, lHits, lShots, lDamage, lAcc)
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%-12.12s %6s %6s %6s %6s %6s %4s^n", lWeapon, lKills, lDeaths, lHits, lShots, lDamage, lAcc)
|
||||
|
||||
for (iWeapon = 1; iWeapon < xmod_get_maxweapons() && MAX_BUFFER_LENGTH - iLen > 0 ; iWeapon++)
|
||||
{
|
||||
if (get_user_wstats(id, iWeapon, izStats, izBody))
|
||||
{
|
||||
xmod_get_wpnname(iWeapon, t_sWpn, MAX_WEAPON_LENGTH)
|
||||
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%-12.12s %6d %6d %6d %6d %6d %3.0f%%^n", t_sWpn, izStats[STATS_KILLS], izStats[STATS_DEATHS],
|
||||
iLen += formatex(sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%-12.12s %6d %6d %6d %6d %6d %3.0f%%^n", t_sWpn, izStats[STATS_KILLS], izStats[STATS_DEATHS],
|
||||
izStats[STATS_HITS], izStats[STATS_SHOTS], izStats[STATS_DAMAGE], accuracy(izStats))
|
||||
}
|
||||
}
|
||||
|
@ -1081,15 +1081,15 @@ public cmdReport(id)
|
|||
|
||||
new lWeapon[16]
|
||||
|
||||
format(lWeapon, 15, "%L", id, "WEAPON")
|
||||
formatex(lWeapon, 15, "%L", id, "WEAPON")
|
||||
strtolower(lWeapon)
|
||||
|
||||
if (iClip >= 0)
|
||||
{
|
||||
format(g_sBuffer, MAX_BUFFER_LENGTH, "%s: %s, %L: %d/%d, %L: %d, %L: %d", lWeapon, t_sWpn, LANG_SERVER, "AMMO", iClip, iAmmo, LANG_SERVER, "HEALTH", iHealth, LANG_SERVER, "ARMOR", iArmor)
|
||||
formatex(g_sBuffer, MAX_BUFFER_LENGTH, "%s: %s, %L: %d/%d, %L: %d, %L: %d", lWeapon, t_sWpn, LANG_SERVER, "AMMO", iClip, iAmmo, LANG_SERVER, "HEALTH", iHealth, LANG_SERVER, "ARMOR", iArmor)
|
||||
}
|
||||
else
|
||||
format(g_sBuffer, MAX_BUFFER_LENGTH, "%s: %s, %L: %d, %L: %d", lWeapon, t_sWpn[7], LANG_SERVER, "HEALTH", iHealth, LANG_SERVER, "ARMOR", iArmor)
|
||||
formatex(g_sBuffer, MAX_BUFFER_LENGTH, "%s: %s, %L: %d, %L: %d", lWeapon, t_sWpn[7], LANG_SERVER, "HEALTH", iHealth, LANG_SERVER, "ARMOR", iArmor)
|
||||
|
||||
engclient_cmd(id, "say_team", g_sBuffer)
|
||||
|
||||
|
@ -1119,7 +1119,7 @@ public cmdSwitch(id)
|
|||
|
||||
new lEnDis[32]
|
||||
|
||||
format(lEnDis, 31, "%L", id, g_izStatsSwitch[id] ? "ENABLED" : "DISABLED")
|
||||
formatex(lEnDis, 31, "%L", id, g_izStatsSwitch[id] ? "ENABLED" : "DISABLED")
|
||||
client_print(id, print_chat, "* %L", id, "STATS_ANNOUNCE", lEnDis)
|
||||
|
||||
return PLUGIN_CONTINUE
|
||||
|
@ -1214,7 +1214,7 @@ showStatsMenu(id, iMenuPos)
|
|||
iMenuPos = iMenuPosMax - 1
|
||||
|
||||
iUserIndex = iMenuPos * PPL_MENU_OPTIONS
|
||||
iLen = format(g_sBuffer, MAX_BUFFER_LENGTH, "\y%L\R%d/%d^n\w^n", id, "SERVER_STATS", iMenuPos + 1, iMenuPosMax)
|
||||
iLen = formatex(g_sBuffer, MAX_BUFFER_LENGTH, "\y%L\R%d/%d^n\w^n", id, "SERVER_STATS", iMenuPos + 1, iMenuPosMax)
|
||||
iMenuOptionMax = iPlayers - iUserIndex
|
||||
|
||||
if (iMenuOptionMax > PPL_MENU_OPTIONS)
|
||||
|
@ -1224,22 +1224,22 @@ showStatsMenu(id, iMenuPos)
|
|||
{
|
||||
get_user_name(g_izUserMenuPlayers[id][iUserIndex++], t_sName, MAX_NAME_LENGTH)
|
||||
iKeyMask |= (1<<iMenuOption)
|
||||
iLen += format(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%d. %s^n\w", iMenuOption + 1, t_sName)
|
||||
iLen += formatex(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "%d. %s^n\w", iMenuOption + 1, t_sName)
|
||||
}
|
||||
|
||||
iKeyMask |= MENU_KEY_8|MENU_KEY_0
|
||||
iLen += format(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n8. %s^n\w", g_izUserMenuActionText[g_izUserMenuAction[id]])
|
||||
iLen += formatex(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n8. %s^n\w", g_izUserMenuActionText[g_izUserMenuAction[id]])
|
||||
|
||||
if (iPlayers > iUserIndex)
|
||||
{
|
||||
iLen += format(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n9. %L...", id, "MORE")
|
||||
iLen += formatex(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n9. %L...", id, "MORE")
|
||||
iKeyMask |= MENU_KEY_9
|
||||
}
|
||||
|
||||
if (iMenuPos > 0)
|
||||
iLen += format(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n0. %L", id, "BACK")
|
||||
iLen += formatex(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n0. %L", id, "BACK")
|
||||
else
|
||||
iLen += format(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n0. %L", id, "EXIT")
|
||||
iLen += formatex(g_sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, "^n0. %L", id, "EXIT")
|
||||
|
||||
show_menu(id, iKeyMask, g_sBuffer, -1, "Server Stats")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user