mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Use new flags in get_players/find_player instead to avoid breakage.
This commit is contained in:
parent
76811b7b84
commit
68aec7eec0
@ -2261,7 +2261,7 @@ static cell AMX_NATIVE_CALL get_players(AMX *amx, cell *params) /* 4 param */
|
||||
for (int i = 1; i <= gpGlobals->maxClients; ++i)
|
||||
{
|
||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(i);
|
||||
if (pPlayer->initialized)
|
||||
if (((flags & 256) && pPlayer->initialized) || pPlayer->ingame)
|
||||
{
|
||||
if (pPlayer->IsAlive() ? (flags & 2) : (flags & 1))
|
||||
continue;
|
||||
@ -2317,7 +2317,7 @@ static cell AMX_NATIVE_CALL find_player(AMX *amx, cell *params) /* 1 param */
|
||||
{
|
||||
CPlayer* pPlayer = GET_PLAYER_POINTER_I(i);
|
||||
|
||||
if (pPlayer->initialized)
|
||||
if (((flags & 4096) && pPlayer->initialized) || pPlayer->ingame)
|
||||
{
|
||||
if (pPlayer->IsAlive() ? (flags & 64) : (flags & 32))
|
||||
continue;
|
||||
|
@ -1215,6 +1215,7 @@ native get_playersnum(flag=0);
|
||||
* "f" - match with part of name
|
||||
* "g" - match case insensitive
|
||||
* "h" - do not include HLTV proxies
|
||||
* "i" - include connecting clients
|
||||
* @param team String to match against if the "e" or "f" flag is specified
|
||||
*
|
||||
* @noreturn
|
||||
@ -1301,8 +1302,10 @@ native get_flags(flags, output[], len);
|
||||
* "j" - return last matched client instead of the first
|
||||
* "k" - match with userid
|
||||
* "l" - match case insensitively
|
||||
* "m" - include connecting clients
|
||||
* @param ... String to match against (integer if "k" flag is specified)
|
||||
*
|
||||
* @return Client index, or 0 if no client was found
|
||||
*/
|
||||
native find_player(const flags[], ...);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user