- added ability for statscfg to use translations (amb28)
- added ML translations for new statscfg lines (amb28, from kwo) - added miscstats/statsx support for new statscfg lines (amb28, patches from kwo)
This commit is contained in:
parent
16c17cff63
commit
ee5dccfc0f
|
@ -206,35 +206,35 @@ public plugin_cfg()
|
|||
{
|
||||
new g_addStast[] = "amx_statscfg add ^"%s^" %s"
|
||||
|
||||
server_cmd(g_addStast, "MultiKill", "MultiKill")
|
||||
server_cmd(g_addStast, "MultiKillSound", "MultiKillSound")
|
||||
server_cmd(g_addStast, "Bomb Planting", "BombPlanting")
|
||||
server_cmd(g_addStast, "Bomb Defusing", "BombDefusing")
|
||||
server_cmd(g_addStast, "Bomb Planted", "BombPlanted")
|
||||
server_cmd(g_addStast, "Bomb Defuse Succ.", "BombDefused")
|
||||
server_cmd(g_addStast, "Bomb Def. Failure", "BombFailed")
|
||||
server_cmd(g_addStast, "Bomb PickUp", "BombPickUp")
|
||||
server_cmd(g_addStast, "Bomb Drop", "BombDrop")
|
||||
server_cmd(g_addStast, "Bomb Count Down", "BombCountVoice")
|
||||
server_cmd(g_addStast, "Bomb Count Down (def)", "BombCountDef")
|
||||
server_cmd(g_addStast, "Bomb Site Reached", "BombReached")
|
||||
server_cmd(g_addStast, "Italy Bonus Kill", "ItalyBonusKill")
|
||||
server_cmd(g_addStast, "Last Man", "LastMan")
|
||||
server_cmd(g_addStast, "Knife Kill", "KnifeKill")
|
||||
server_cmd(g_addStast, "Knife Kill Sound", "KnifeKillSound")
|
||||
server_cmd(g_addStast, "Grenade Kill", "GrenadeKill")
|
||||
server_cmd(g_addStast, "Grenade Suicide", "GrenadeSuicide")
|
||||
server_cmd(g_addStast, "HeadShot Kill", "HeadShotKill")
|
||||
server_cmd(g_addStast, "HeadShot Kill Sound", "HeadShotKillSound")
|
||||
server_cmd(g_addStast, "Round Counter", "RoundCounter")
|
||||
server_cmd(g_addStast, "Round Counter Sound", "RoundCounterSound")
|
||||
server_cmd(g_addStast, "Killing Streak", "KillingStreak")
|
||||
server_cmd(g_addStast, "Killing Streak Sound", "KillingStreakSound")
|
||||
server_cmd(g_addStast, "Enemy Remaining", "EnemyRemaining")
|
||||
server_cmd(g_addStast, "Double Kill", "DoubleKill")
|
||||
server_cmd(g_addStast, "Double Kill Sound", "DoubleKillSound")
|
||||
server_cmd(g_addStast, "Player Name", "PlayerName")
|
||||
server_cmd(g_addStast, "First Blood Sound", "FirstBloodSound")
|
||||
server_cmd(g_addStast, "ST_MULTI_KILL", "MultiKill")
|
||||
server_cmd(g_addStast, "ST_MULTI_KILL_SOUND", "MultiKillSound")
|
||||
server_cmd(g_addStast, "ST_BOMB_PLANTING", "BombPlanting")
|
||||
server_cmd(g_addStast, "ST_BOMB_DEFUSING", "BombDefusing")
|
||||
server_cmd(g_addStast, "ST_BOMB_PLANTED", "BombPlanted")
|
||||
server_cmd(g_addStast, "ST_BOMB_DEF_SUCC", "BombDefused")
|
||||
server_cmd(g_addStast, "ST_BOMB_DEF_FAIL", "BombFailed")
|
||||
server_cmd(g_addStast, "ST_BOMB_PICKUP", "BombPickUp")
|
||||
server_cmd(g_addStast, "ST_BOMB_DROP", "BombDrop")
|
||||
server_cmd(g_addStast, "ST_BOMB_CD_VOICE", "BombCountVoice")
|
||||
server_cmd(g_addStast, "ST_BOMB_CD_DEF", "BombCountDef")
|
||||
server_cmd(g_addStast, "ST_BOMB_SITE", "BombReached")
|
||||
server_cmd(g_addStast, "ST_ITALY_BONUS", "ItalyBonusKill")
|
||||
server_cmd(g_addStast, "ST_LAST_MAN", "LastMan")
|
||||
server_cmd(g_addStast, "ST_KNIFE_KILL", "KnifeKill")
|
||||
server_cmd(g_addStast, "ST_KNIFE_KILL_SOUND", "KnifeKillSound")
|
||||
server_cmd(g_addStast, "ST_HE_KILL", "GrenadeKill")
|
||||
server_cmd(g_addStast, "ST_HE_SUICIDE", "GrenadeSuicide")
|
||||
server_cmd(g_addStast, "ST_HS_KILL", "HeadShotKill")
|
||||
server_cmd(g_addStast, "ST_HS_KILL_SOUND", "HeadShotKillSound")
|
||||
server_cmd(g_addStast, "ST_ROUND_CNT", "RoundCounter")
|
||||
server_cmd(g_addStast, "ST_ROUND_CNT_SOUND", "RoundCounterSound")
|
||||
server_cmd(g_addStast, "ST_KILL_STR", "KillingStreak")
|
||||
server_cmd(g_addStast, "ST_KILL_STR_SOUND", "KillingStreakSound")
|
||||
server_cmd(g_addStast, "ST_ENEMY_REM", "EnemyRemaining")
|
||||
server_cmd(g_addStast, "ST_DOUBLE_KILL", "DoubleKill")
|
||||
server_cmd(g_addStast, "ST_DOUBLE_KILL_SOUND", "DoubleKillSound")
|
||||
server_cmd(g_addStast, "ST_PLAYER_NAME", "PlayerName")
|
||||
server_cmd(g_addStast, "ST_FIRST_BLOOD_SOUND", "FirstBloodSound")
|
||||
}
|
||||
|
||||
public client_putinserver(id)
|
||||
|
@ -297,7 +297,7 @@ public client_death(killer, victim, wpnindex, hitplace, TK)
|
|||
|
||||
if (MultiKill || MultiKillSound)
|
||||
{
|
||||
if (!selfkill && !TK)
|
||||
if (!selfkill && !TK && killer)
|
||||
{
|
||||
g_multiKills[killer][0]++
|
||||
g_multiKills[killer][1] += headshot
|
||||
|
@ -535,7 +535,7 @@ public setTeam(id)
|
|||
|
||||
public showStatus(id)
|
||||
{
|
||||
if (PlayerName)
|
||||
if(!is_user_bot(id) && is_user_connected(id) && PlayerName)
|
||||
{
|
||||
new name[32], pid = read_data(2)
|
||||
|
||||
|
@ -555,10 +555,10 @@ public showStatus(id)
|
|||
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)
|
||||
set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, -1)
|
||||
ShowSyncHudMsg(id, g_status_sync, "%s -- %d HP / %d AP / %s", name, get_user_health(pid), get_user_armor(pid), wpnname)
|
||||
} else {
|
||||
set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01)
|
||||
set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, -1)
|
||||
ShowSyncHudMsg(id, g_status_sync, "%s", name)
|
||||
}
|
||||
}
|
||||
|
@ -652,8 +652,10 @@ public checkKills(param[])
|
|||
}
|
||||
|
||||
public chickenKill()
|
||||
{
|
||||
if (ItalyBonusKill)
|
||||
announceEvent(0, "KILLED_CHICKEN")
|
||||
}
|
||||
|
||||
public radioKill()
|
||||
{
|
||||
|
@ -671,12 +673,16 @@ announceEvent(id, message[])
|
|||
}
|
||||
|
||||
public eBombPickUp(id)
|
||||
{
|
||||
if (BombPickUp)
|
||||
announceEvent(id, "PICKED_BOMB")
|
||||
}
|
||||
|
||||
public eBombDrop()
|
||||
{
|
||||
if (BombDrop)
|
||||
announceEvent(g_Planter, "DROPPED_BOMB")
|
||||
}
|
||||
|
||||
public eGotBomb(id)
|
||||
{
|
||||
|
@ -731,8 +737,10 @@ public bomb_planted(planter)
|
|||
}
|
||||
|
||||
public bomb_planting(planter)
|
||||
{
|
||||
if (BombPlanting)
|
||||
announceEvent(planter, "PLANT_BOMB")
|
||||
}
|
||||
|
||||
public bomb_defusing(defuser)
|
||||
{
|
||||
|
@ -743,12 +751,16 @@ public bomb_defusing(defuser)
|
|||
}
|
||||
|
||||
public bomb_defused(defuser)
|
||||
{
|
||||
if (BombDefused)
|
||||
announceEvent(defuser, "DEFUSED_BOMB")
|
||||
}
|
||||
|
||||
public bomb_explode(planter, defuser)
|
||||
{
|
||||
if (BombFailed && defuser)
|
||||
announceEvent(defuser, "FAILED_DEFU")
|
||||
}
|
||||
|
||||
public play_sound(sound[])
|
||||
{
|
||||
|
|
|
@ -177,6 +177,7 @@ new t_sName[MAX_NAME_LENGTH + 1] = ""
|
|||
new t_sWpn[MAX_WEAPON_LENGTH + 1] = ""
|
||||
|
||||
new g_HudSync_EndRound
|
||||
new g_HudSync_SpecInfo
|
||||
|
||||
//--------------------------------
|
||||
// Initialize
|
||||
|
@ -237,34 +238,35 @@ public plugin_init()
|
|||
save_team_chatscore()
|
||||
|
||||
g_HudSync_EndRound = CreateHudSyncObj()
|
||||
g_HudSync_SpecInfo = CreateHudSyncObj()
|
||||
}
|
||||
|
||||
public plugin_cfg()
|
||||
{
|
||||
new addStast[] = "amx_statscfg add ^"%s^" %s"
|
||||
|
||||
server_cmd(addStast, "Show killer hp&ap", "KillerChat")
|
||||
server_cmd(addStast, "Show Attackers", "ShowAttackers")
|
||||
server_cmd(addStast, "Show Victims", "ShowVictims")
|
||||
server_cmd(addStast, "Show killer", "ShowKiller")
|
||||
server_cmd(addStast, "Show Team Score", "ShowTeamScore")
|
||||
server_cmd(addStast, "Show Total Stats", "ShowTotalStats")
|
||||
server_cmd(addStast, "Show Best Score", "ShowBestScore")
|
||||
server_cmd(addStast, "Show Most Disruptive", "ShowMostDisruptive")
|
||||
server_cmd(addStast, "HUD-stats default", "ShowStats")
|
||||
server_cmd(addStast, "Dist&HS in HUD lists", "ShowDistHS")
|
||||
server_cmd(addStast, "Stats at the end of map", "EndPlayer")
|
||||
server_cmd(addStast, "Top15 at the end of map", "EndTop15")
|
||||
server_cmd(addStast, "Say /hp", "SayHP")
|
||||
server_cmd(addStast, "Say /statsme", "SayStatsMe")
|
||||
server_cmd(addStast, "Say /rankstats", "SayRankStats")
|
||||
server_cmd(addStast, "Say /me", "SayMe")
|
||||
server_cmd(addStast, "Say /rank", "SayRank")
|
||||
server_cmd(addStast, "Say /report", "SayReport")
|
||||
server_cmd(addStast, "Say /score", "SayScore")
|
||||
server_cmd(addStast, "Say /top15", "SayTop15")
|
||||
server_cmd(addStast, "Say /stats", "SayStatsAll")
|
||||
server_cmd(addStast, "Spec. Rank Info", "SpecRankInfo")
|
||||
server_cmd(addStast, "ST_SHOW_KILLER_CHAT", "KillerChat")
|
||||
server_cmd(addStast, "ST_SHOW_ATTACKERS", "ShowAttackers")
|
||||
server_cmd(addStast, "ST_SHOW_VICTIMS", "ShowVictims")
|
||||
server_cmd(addStast, "ST_SHOW_KILLER", "ShowKiller")
|
||||
server_cmd(addStast, "ST_SHOW_TEAM_SCORE", "ShowTeamScore")
|
||||
server_cmd(addStast, "ST_SHOW_TOTAL_STATS", "ShowTotalStats")
|
||||
server_cmd(addStast, "ST_SHOW_BEST_SCORE", "ShowBestScore")
|
||||
server_cmd(addStast, "ST_SHOW_MOST_DISRUPTIVE", "ShowMostDisruptive")
|
||||
server_cmd(addStast, "ST_SHOW_HUD_STATS_DEF", "ShowStats")
|
||||
server_cmd(addStast, "ST_SHOW_DIST_HS_HUD", "ShowDistHS")
|
||||
server_cmd(addStast, "ST_STATS_PLAYER_MAP_END", "EndPlayer")
|
||||
server_cmd(addStast, "ST_STATS_TOP15_MAP_END", "EndTop15")
|
||||
server_cmd(addStast, "ST_SAY_HP", "SayHP")
|
||||
server_cmd(addStast, "ST_SAY_STATSME", "SayStatsMe")
|
||||
server_cmd(addStast, "ST_SAY_RANKSTATS", "SayRankStats")
|
||||
server_cmd(addStast, "ST_SAY_ME", "SayMe")
|
||||
server_cmd(addStast, "ST_SAY_RANK", "SayRank")
|
||||
server_cmd(addStast, "ST_SAY_REPORT", "SayReport")
|
||||
server_cmd(addStast, "ST_SAY_SCORE", "SayScore")
|
||||
server_cmd(addStast, "ST_SAY_TOP15", "SayTop15")
|
||||
server_cmd(addStast, "ST_SAY_STATS", "SayStatsAll")
|
||||
server_cmd(addStast, "ST_SPEC_RANK", "SpecRankInfo")
|
||||
|
||||
// Update local configuration vars with value in cvars.
|
||||
get_config_cvars()
|
||||
|
@ -287,7 +289,7 @@ set_hudtype_victim(Float:fDuration)
|
|||
|
||||
set_hudtype_specmode()
|
||||
{
|
||||
set_hudmessage(255, 255, 255, 0.02, 0.87, 2, 0.05, 0.1, 0.01, 3.0, -1)
|
||||
set_hudmessage(255, 255, 255, 0.02, 0.96, 2, 0.05, 0.1, 0.01, 3.0, -1)
|
||||
}
|
||||
|
||||
#if defined STATSX_DEBUG
|
||||
|
@ -1677,7 +1679,7 @@ public eventShowRank(id)
|
|||
iRankMax = get_statsnum()
|
||||
|
||||
set_hudtype_specmode()
|
||||
show_hudmessage(id, "%L", id, "X_RANK_IS", t_sName, iRankPos, iRankMax)
|
||||
ShowSyncHudMsg(id, g_HudSync_SpecInfo, "%L", id, "X_RANK_IS", t_sName, iRankPos, iRankMax)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -366,7 +366,7 @@ LEFTLEG = lewa noga
|
|||
RIGHTLEG = prawa noga
|
||||
MODE_SET_TO = "amx_statsx_mode" ustawiono na "%s"
|
||||
ATTACKERS = Atakujacy
|
||||
ACC = acc.
|
||||
ACC = cel.
|
||||
HIT_S = trafien
|
||||
DMG = obr
|
||||
VICTIMS = Ofiary
|
||||
|
@ -374,7 +374,7 @@ MOST_DMG = Najwiecej obrazen:
|
|||
KILLED_YOU_DIST = %s zabil cie z %s^nfrom z odleglosci %0.2f metrow.
|
||||
DID_DMG_HITS = %d zadal ci %d obrazen ^ni nadal ma %d zycia i %d zbroi.
|
||||
YOU_DID_DMG = Zadales %d obrazen %d trafieniami.
|
||||
EFF = eff.
|
||||
EFF = skut.
|
||||
BEST_SCORE = Najlepszy wynik
|
||||
KILL_S = zabil
|
||||
TOTAL = Lacznie
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <amxmodx>
|
||||
#include <amxmisc>
|
||||
|
||||
#define MAX_MENU_DATA 64
|
||||
#define MAX_MENU_DATA 72
|
||||
|
||||
new g_menuData[MAX_MENU_DATA][32]
|
||||
new g_menuDataVar[MAX_MENU_DATA][32]
|
||||
|
@ -218,7 +218,13 @@ displayCfgMenu(id, pos)
|
|||
for (new a = start; a < end; ++a)
|
||||
{
|
||||
keys |= (1<<k)
|
||||
len += format(menu_body[len], 511-len, g_coloredMenus ? "%d. %s\y\R%L^n\w" : "%d. %s %L^n", ++k, g_menuData[a], id, get_xvar_num(g_menuDataId[a]) ? "ON" : "OFF")
|
||||
/* Backwards compatibility hack - if the name starts with ST_, assume it is translation safe! */
|
||||
if (equal(g_menuData[a], "ST_", 3))
|
||||
{
|
||||
len += format(menu_body[len], 511-len, g_coloredMenus ? "%d. %L\y\R%L^n\w" : "%d. %L %L^n", ++k, id, g_menuData[a], id, get_xvar_num(g_menuDataId[a]) ? "ON" : "OFF")
|
||||
} else {
|
||||
len += format(menu_body[len], 511-len, g_coloredMenus ? "%d. %s\y\R%L^n\w" : "%d. %L %L^n", ++k, g_menuData[a], id, get_xvar_num(g_menuDataId[a]) ? "ON" : "OFF")
|
||||
}
|
||||
}
|
||||
|
||||
if (g_menuDataNum == 0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user