updated the avghour command to distinct between nomination average hour and the mapvote/rtv average hour and also shows the clients own mapvote/rtv boost plus percentage worth
This commit is contained in:
parent
20ddc26c76
commit
fc2f5d6eb9
@ -686,7 +686,20 @@ public Action Command_ReloadMaps(int client, int args)
|
|||||||
|
|
||||||
public Action Command_hours_average(int client, int args)
|
public Action Command_hours_average(int client, int args)
|
||||||
{
|
{
|
||||||
CReplyToCommand(client, "Average hour count is: %i", GetAveragePlayerTimeOnServer());
|
float total_votes = 0.0;
|
||||||
|
for (int i = 0; i < MaxClients; i++)
|
||||||
|
{
|
||||||
|
if (IsValidClient(i) && !is_bot_player[i] && PM_IsPlayerSteam(i))
|
||||||
|
{
|
||||||
|
GetPlayerWorthRTV_(i);
|
||||||
|
total_votes += GetPlayerWorthRTV_boost_(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CReplyToCommand(client, "Average hour count for nominations is: %i \nAverage hour count for mapvote and rtv boost is: %i \nYour mapvote and rtv boost is %0.1f (%i%%)",
|
||||||
|
GetAveragePlayerTimeOnServer(),
|
||||||
|
GetAveragePlayerTimeOnServerRTV(),
|
||||||
|
GetPlayerWorthRTV_boost_(client),
|
||||||
|
RoundToFloor((GetPlayerWorthRTV_boost_(client)/total_votes) * 100));
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user