further changes to show rtv boost correctly and display in percentage
This commit is contained in:
		
							parent
							
								
									c09968a69d
								
							
						
					
					
						commit
						5808ec235d
					
				@ -276,7 +276,12 @@ void AttemptRTV(int client)
 | 
			
		||||
    if (g_Voted[client])
 | 
			
		||||
    {
 | 
			
		||||
        float rtv_worth = GetPlayerWorthRTV_boost_(client);
 | 
			
		||||
        ReplyToCommand(client, "[RTVE] %t", "Already Voted", g_Votes, g_VotesNeeded, rtv_worth);
 | 
			
		||||
        if (g_VotesNeeded == 0)
 | 
			
		||||
        {
 | 
			
		||||
            g_VotesNeeded = g_Votes;
 | 
			
		||||
        }
 | 
			
		||||
        int rtv_percentage_reached = RoundToFloor((float(g_Votes) / float(g_VotesNeeded)) * 100);
 | 
			
		||||
        ReplyToCommand(client, "[RTVE] %t", "Already Voted", rtv_percentage_reached, "%", rtv_worth);
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -293,7 +298,12 @@ void AttemptRTV(int client)
 | 
			
		||||
    g_Voted[client] = true;
 | 
			
		||||
 | 
			
		||||
    float rtv_worth = GetPlayerWorthRTV_boost_(client);
 | 
			
		||||
    PrintToChatAll("[RTVE] %t", "RTV Requested", name, g_Votes, g_VotesNeeded, rtv_worth);
 | 
			
		||||
    if (g_VotesNeeded == 0)
 | 
			
		||||
    {
 | 
			
		||||
        g_VotesNeeded = g_Votes;
 | 
			
		||||
    }
 | 
			
		||||
    int rtv_percentage_reached = RoundToFloor((float(g_Votes) / float(g_VotesNeeded)) * 100);
 | 
			
		||||
    PrintToChatAll("[RTVE] %t", "RTV Requested", name, rtv_percentage_reached, "%", rtv_worth);
 | 
			
		||||
 | 
			
		||||
    if (g_Votes >= g_VotesNeeded)
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
@ -22,8 +22,8 @@
 | 
			
		||||
	
 | 
			
		||||
    "Already Voted"
 | 
			
		||||
    {
 | 
			
		||||
        "#format"       "{1:d},{2:d},{3:.1f}"
 | 
			
		||||
        "en"            "You have already voted to Rock the Vote. ({1} total hour votes, {2} required). ({3} RTV boost)"
 | 
			
		||||
        "#format"       "{1:d},{2:s},{3:.1f}"
 | 
			
		||||
        "en"            "You have already voted to Rock the Vote. ({1}{2} RTV reached. ({3} RTV boost)"
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	"Wait Before Revoting"
 | 
			
		||||
@ -44,8 +44,8 @@
 | 
			
		||||
	
 | 
			
		||||
    "RTV Requested"
 | 
			
		||||
    {
 | 
			
		||||
        "#format"       "{1:s},{2:d},{3:d},{4:.1f}"
 | 
			
		||||
        "en"            "{1} wants to rock the vote. ({2} total hour votes, {3} required). ({4} RTV boost)"
 | 
			
		||||
        "#format"       "{1:s},{2:d},{3:s},{4:.1f}"
 | 
			
		||||
        "en"            "{1} wants to rock the vote. ({2}{3} RTV reached) ({4} RTV boost)"
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	"RTV Undone"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user