No lo termine, pero es un comienzo
PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
new g_Maxplayers
public plugin_init()
{
register_plugin("5 vs 5", "1.0", "KiLlEsT(Swaycher)")
register_clcmd("say /test", "inicia_funcion")
g_Maxplayers = clamp(get_maxplayers(), 1, 32)
}
public inicia_funcion(id)
{
if (!(get_user_flags(id) & ADMIN_MENU))
return
if (get_playersnum() == 10)
{
for (new i = 1; i <= g_Maxplayers; i++)
{
if (!is_user_connected(i)) continue
cs_set_user_team(i, random_num(1, 2)) //No estoy seguro de si este bien, lo único que le temo a esto es que mande a todos a un mismo team random.
}
}
else if (get_playersnum() > 10)
{
//Intente hacer esta parte pero tuve errores y no se me ocurre como hacerla.
}
else
{
client_print(id, print_center, "No hay suficientes jugadores conectados para ejecutar esta funcion!")
return
}
}
__________________