get_players: paramas clarification
Here is get_players source from amxx:
Spoiler
PHP Code:
static cell AMX_NATIVE_CALL get_players(AMX *amx, cell *params) /* 4 param */ { int iNum = 0; int ilen; char* sptemp = get_amxstring(amx, params[3], 0, ilen); int flags = UTIL_ReadFlags(sptemp);
cell *aPlayers = get_amxaddr(amx, params[1]); cell *iMax = get_amxaddr(amx, params[2]);
int team = 0;
if (flags & 48) { sptemp = get_amxstring(amx, params[4], 0, ilen);
if (flags & 16) { if (flags & 64) team = g_teamsIds.findTeamId(sptemp); else team = g_teamsIds.findTeamIdCase(sptemp); } }
for (int i = 1; i <= gpGlobals->maxClients; ++i) { CPlayer* pPlayer = GET_PLAYER_POINTER_I(i); if (pPlayer->ingame) { if (pPlayer->IsAlive() ? (flags & 2) : (flags & 1)) continue; if (pPlayer->IsBot() ? (flags & 4) : (flags & 8)) continue; if ((flags & 16) && (pPlayer->teamId != team)) continue; if ((flags & 128) && (pPlayer->pEdict->v.flags & FL_PROXY)) continue; if (flags & 32) { if (flags & 64) { if (stristr(pPlayer->name.c_str(), sptemp) == NULL) continue; } else if (strstr(pPlayer->name.c_str(), sptemp) == NULL) continue; } aPlayers[iNum++] = i; } }
*iMax = iNum; return 1; }
so, if i used:
PHP Code:
new iPlayers[ 32 ], iNum get_players( iPlayers, iNum ) // flags = ""
what part is called from source, and what part is not called ?
For example i posted with flags = "", these part is called: ?
Spoiler
PHP Code:
if ((flags & 128) && (pPlayer->pEdict->v.flags & FL_PROXY)) continue; if (flags & 32) { if (flags & 64) { if (stristr(pPlayer->name.c_str(), sptemp) == NULL) continue; } else if (strstr(pPlayer->name.c_str(), sptemp) == NULL) continue; }
if i used: get_players( iPlayers, iNum, "h" )
PHP Code:
if ((flags & 128) && (pPlayer->pEdict->v.flags & FL_PROXY)) continue;
(players/entityes) pEdict->v.flags with FL_PROXY ( HLTV) flag will be ignored, right ?
Sorry for dumb thread.
|