Re: rounds left
Posted: 14 Jan 2019, 16:10
Okay nevermind.
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)
}
}