mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-04-09 03:00:07 +03:00
Change param name in get_playersnum_ex
This commit is contained in:
parent
8fd8e782d8
commit
0fa9766677
@ -865,9 +865,37 @@ stock set_task_ex(Float:time, const function[], id = 0, const any:parameter[] =
|
|||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
stock get_players_ex(players[MAX_PLAYERS], &num, GetPlayersFlags:flags = GetPlayers_None, const string[] = "")
|
stock get_players_ex(players[MAX_PLAYERS] = {}, &num, GetPlayersFlags:flags = GetPlayers_None, const string[] = "")
|
||||||
{
|
{
|
||||||
new strFlags[12];
|
new strFlags[12];
|
||||||
get_flags(_:flags, strFlags, charsmax(strFlags));
|
get_flags(_:flags, strFlags, charsmax(strFlags));
|
||||||
get_players(players, num, strFlags, string);
|
get_players(players, num, strFlags, string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of clients on the server that match the specified flags.
|
||||||
|
*
|
||||||
|
* @note Example retrieving all alive CTs:
|
||||||
|
* new AliveCt = get_playersnum_ex(GetPlayers_ExcludeDead | GetPlayers_MatchTeam, "CT")
|
||||||
|
*
|
||||||
|
* @param flags Optional filtering flags (enum GetPlayersFlags); valid flags are:
|
||||||
|
* GetPlayers_None - No filter (Default)
|
||||||
|
* GetPlayers_ExcludeDead - do not include dead clients
|
||||||
|
* GetPlayers_ExcludeAlive - do not include alive clients
|
||||||
|
* GetPlayers_ExcludeBots - do not include bots
|
||||||
|
* GetPlayers_ExcludeHuman - do not include human clients
|
||||||
|
* GetPlayers_MatchTeam - match with team
|
||||||
|
* GetPlayers_MatchNameSubstring - match with part of name
|
||||||
|
* GetPlayers_CaseInsensitive - match case insensitive
|
||||||
|
* GetPlayers_ExcludeHLTV - do not include HLTV proxies
|
||||||
|
* GetPlayers_IncludeConnecting - include connecting clients
|
||||||
|
* @param string String to match against if the GetPlayers_MatchTeam or GetPlayers_MatchNameSubstring flag is specified
|
||||||
|
*
|
||||||
|
* @return Number of clients on the server that match the specified flags
|
||||||
|
*/
|
||||||
|
stock get_playersnum_ex(GetPlayersFlags:flags = GetPlayers_None, const string[] = "")
|
||||||
|
{
|
||||||
|
new PlayersNum;
|
||||||
|
get_players_ex(_, PlayersNum, flags, string);
|
||||||
|
return PlayersNum;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user