set cap to 100%

This commit is contained in:
jenz 2023-09-30 10:05:40 +02:00
parent fc2f5d6eb9
commit 47085dcacf

View File

@ -297,8 +297,12 @@ void AttemptRTV(int client)
{
rtv_percentage_reached = 100;
}
ReplyToCommand(client, "[RTVE] %t", "Already Voted", rtv_percentage_reached, rtv_worth,
RoundToFloor((GetPlayerWorthRTV_(client) / float(g_VotesNeeded)) * 100));
int clients_percentage = RoundToFloor((GetPlayerWorthRTV_(client) / float(g_VotesNeeded)) * 100);
if (clients_percentage > 100)
{
clients_percentage = 100;
}
ReplyToCommand(client, "[RTVE] %t", "Already Voted", rtv_percentage_reached, rtv_worth, clients_percentage);
return;
}
@ -324,8 +328,12 @@ void AttemptRTV(int client)
{
rtv_percentage_reached = 100;
}
PrintToChatAll("[RTVE] %t", "RTV Requested", name, rtv_percentage_reached, rtv_worth,
RoundToFloor((GetPlayerWorthRTV_(client) / float(g_VotesNeeded)) * 100));
int clients_percentage = RoundToFloor((GetPlayerWorthRTV_(client) / float(g_VotesNeeded)) * 100);
if (clients_percentage > 100)
{
clients_percentage = 100;
}
PrintToChatAll("[RTVE] %t", "RTV Requested", name, rtv_percentage_reached, rtv_worth, clients_percentage);
if (Votes >= g_VotesNeeded)
{