mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-04-08 10:49:06 +03:00
Add 'j' and 'k' flags in get_user_flags for matching with admin flags
This commit is contained in:
parent
7b3646a012
commit
36337b4a48
@ -2248,6 +2248,7 @@ static cell AMX_NATIVE_CALL get_players(AMX *amx, cell *params) /* 4 param */
|
||||
{
|
||||
int iNum = 0;
|
||||
int ilen;
|
||||
int pflags = 0;
|
||||
char* sptemp = get_amxstring(amx, params[3], 0, ilen);
|
||||
int flags = UTIL_ReadFlags(sptemp);
|
||||
|
||||
@ -2268,6 +2269,12 @@ static cell AMX_NATIVE_CALL get_players(AMX *amx, cell *params) /* 4 param */
|
||||
team = g_teamsIds.findTeamIdCase(sptemp);
|
||||
}
|
||||
}
|
||||
|
||||
if ((flags & 512) || (flags & 1024))
|
||||
{
|
||||
sptemp = get_amxstring(amx, params[4], 0, ilen);
|
||||
pflags = UTIL_ReadFlags(sptemp);
|
||||
}
|
||||
|
||||
for (int i = 1; i <= gpGlobals->maxClients; ++i)
|
||||
{
|
||||
@ -2282,6 +2289,10 @@ static cell AMX_NATIVE_CALL get_players(AMX *amx, cell *params) /* 4 param */
|
||||
continue;
|
||||
if ((flags & 128) && (pPlayer->pEdict->v.flags & FL_PROXY))
|
||||
continue;
|
||||
if ((flags & 512) && ((pPlayer->flags[0] & pflags) != pflags))
|
||||
continue;
|
||||
if ((flags & 1024) && (!(pPlayer->flags[0] & pflags)))
|
||||
continue;
|
||||
if (flags & 32)
|
||||
{
|
||||
if (flags & 64)
|
||||
|
@ -1387,11 +1387,13 @@ native get_playersnum(flag = 0);
|
||||
* "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
|
||||
* "j" - match with all of the specified admin flags
|
||||
* "k" - match with any of the specified admin flags
|
||||
* @param string String to match against if the "e", "f", "j" or "k" flag is specified
|
||||
*
|
||||
* @noreturn
|
||||
*/
|
||||
native get_players(players[MAX_PLAYERS], &num, const flags[] = "", const team[] = "");
|
||||
native get_players(players[MAX_PLAYERS], &num, const flags[] = "", const string[] = "");
|
||||
|
||||
/**
|
||||
* Retrieves argument of client command as string.
|
||||
|
Loading…
x
Reference in New Issue
Block a user