Page 1 of 1

Re: rounds left

Posted: 14 Jan 2019, 16:10
by Spir0x
Okay nevermind.

Re: rounds left

Posted: 16 Jan 2019, 09:14
by sPe3doN
Not working jack it's the same problem it's show me every round
Round remaining: 6

Re: rounds left

Posted: 21 Jan 2019, 13:25
by Muhammet20
sPe3doN wrote: 5 years ago Not working jack it's the same problem it's show me every round
Round remaining: 6
try this:
__________

Code: Select all

#include <amxmodx>
#include <amxmisc>

new MaxRounds
new RoundCount

public plugin_init() {

	register_plugin("roundsleft", "", "Muhammet Kaya")
	register_logevent("round_end", 2, "1=Round_End")
	register_event("TextMsg", "new_map_or_restart", "a", "2&#Game_C", "2&#Game_w")
	register_clcmd("say roundsleft","ShowRoundsLeft")
	MaxRounds = get_cvar_pointer("mp_maxrounds")
}
public round_end() 
{ 
    RoundCount++ 
}

public new_map_or_restart() 
{ 
    RoundCount = 0 
}
public ShowRoundsLeft(id)
{
	if(get_pcvar_num(MaxRounds) == 0)
	{
		client_print(id,print_chat, "No Rounds Limit")
	}
	if(get_pcvar_num(MaxRounds) > 0)
	{
		client_print(id,print_chat, "Rounds Left: %d", get_pcvar_num(MaxRounds) - RoundCount)
	}
}