i want wehen i write /random example : amxx selected player roki and when roki is already selected by the plugin and when you write again / random not to select roki only the other players who are not selected roki not to be selected a second time by the plugin I need such a function
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init()
{
register_plugin("Random Player knife arena", "0.2.1", "badboy");
register_clcmd("say /random", "RandomPlayer");
}
public RandomPlayer(id)
{
if(~get_user_flags(id) & ADMIN_BAN)
return PLUGIN_HANDLED;
getweps()
static player1, player2;
static players[32], iPnum;
get_players(players, iPnum, "e", "TERRORIST");
player1 = players[random(iPnum)];
if(!player1)
{
console_print(id, "[ShowUrSkills] Random player not found.");
return PLUGIN_HANDLED;
}
get_players(players, iPnum, "e", "CT");
player2 = players[random(iPnum)];
if(!player2)
{
console_print(id, "[ShowUrSkills] Random player not found.");
return PLUGIN_HANDLED;
}
static sName[32];
static const iNameLen = sizeof(sName) - 1
get_user_name(player1, sName, iNameLen);
client_print(0, print_chat, "[ShowUrSkills] TERRORIST Random player are Chosed %s.", sName);
get_user_name(player2, sName, iNameLen);
client_print(0, print_chat, "[ShowUrSkills] CT Random player are Chosed %s.", sName);
return PLUGIN_HANDLED;
}
stock getweps()
{
new Players[32], PlayersNum, id
get_players(Players, PlayersNum, "h")
for( new i; i < PlayersNum; i++ )
{
id = Players[i]
if( is_user_connected(id) && is_user_alive(id) )
{
}
}
}