The plugin starts when 1 minute remains from the current map. When 1 minute remains the plugin check the number of the players, and not when the server changes the map.
I also check if the plugin works well, and yes...
PHP Code:
#include <amxmodx>
new pcvar_min_players;
static players[32]
public plugin_init()
{
register_plugin("asd","1.0","KG")
pcvar_min_players = register_cvar("min_players", "6")
}
public juc(id){
set_task(1.0,"jucdoi",id)
}
public jucdoi(id){
new playerCount;
get_players(players, playerCount, "ch");
if (playerCount <= get_pcvar_num(pcvar_min_players)){
client_print(0, print_chat, "THE NUMBER OF PLAYERS IS LESS OR EQUALY THAN %d", get_cvar_num("min_players"));
}
else{
client_print(0, print_chat, "THE NUMBER OF PLAYERS IS HIGHER THAN %d", get_cvar_num("min_players"));
}
return PLUGIN_HANDLED
}