mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
abstract engine color codes to use (Color::<Color>) format to make codes more.
see pt6 parser and configs for example usages
This commit is contained in:
@ -24,9 +24,9 @@ namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
Alias = "xlrstats";
|
||||
Permission = EFClient.Permission.User;
|
||||
RequiresTarget = false;
|
||||
Arguments = new CommandArgument[]
|
||||
Arguments = new []
|
||||
{
|
||||
new CommandArgument()
|
||||
new CommandArgument
|
||||
{
|
||||
Name = "player",
|
||||
Required = false
|
||||
@ -73,14 +73,15 @@ namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
if (pStats == null)
|
||||
{
|
||||
await using var context = _contextFactory.CreateContext(false);
|
||||
pStats = (await context.Set<EFClientStatistics>()
|
||||
.FirstOrDefaultAsync(c => c.ServerId == serverId && c.ClientId == E.Target.ClientId));
|
||||
pStats = await context.Set<EFClientStatistics>()
|
||||
.FirstOrDefaultAsync(c => c.ServerId == serverId && c.ClientId == E.Target.ClientId);
|
||||
}
|
||||
|
||||
// if it's still null then they've not gotten a kill or death yet
|
||||
statLine = pStats == null
|
||||
? _translationLookup["PLUGINS_STATS_COMMANDS_NOTAVAILABLE"]
|
||||
: $"^5{pStats.Kills} ^7{_translationLookup["PLUGINS_STATS_TEXT_KILLS"]} | ^5{pStats.Deaths} ^7{_translationLookup["PLUGINS_STATS_TEXT_DEATHS"]} | ^5{pStats.KDR} ^7KDR | ^5{pStats.Performance} ^7{_translationLookup["PLUGINS_STATS_COMMANDS_PERFORMANCE"].ToUpper()} | {performanceRankingString}";
|
||||
: _translationLookup["COMMANDS_VIEW_STATS_RESULT"].FormatExt(pStats.Kills, pStats.Deaths,
|
||||
pStats.KDR, pStats.Performance, performanceRankingString);
|
||||
}
|
||||
|
||||
// getting self stats
|
||||
@ -108,7 +109,8 @@ namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
// if it's still null then they've not gotten a kill or death yet
|
||||
statLine = pStats == null
|
||||
? _translationLookup["PLUGINS_STATS_COMMANDS_NOTAVAILABLE"]
|
||||
: $"^5{pStats.Kills} ^7{_translationLookup["PLUGINS_STATS_TEXT_KILLS"]} | ^5{pStats.Deaths} ^7{_translationLookup["PLUGINS_STATS_TEXT_DEATHS"]} | ^5{pStats.KDR} ^7KDR | ^5{pStats.Performance} ^7{_translationLookup["PLUGINS_STATS_COMMANDS_PERFORMANCE"].ToUpper()} | {performanceRankingString}";
|
||||
: _translationLookup["COMMANDS_VIEW_STATS_RESULT"].FormatExt(pStats.Kills, pStats.Deaths,
|
||||
pStats.KDR, pStats.Performance, performanceRankingString);
|
||||
}
|
||||
|
||||
if (E.Message.IsBroadcastCommand(_config.BroadcastCommandPrefix))
|
||||
|
Reference in New Issue
Block a user