Thread: BOT tag
View Single Post
Re: BOT tag
Old
  (#5)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: BOT tag - 03-06-2006

Yeah - they use it:
Code:
#define PLAYER_CNX_STATS        ( *g_engfuncs.pfnGetPlayerStats )
(...)
static cell AMX_NATIVE_CALL get_user_ping(AMX *amx, cell *params) /* 3 param */
{
    int index = params[1];
    
    if (index < 1 || index > gpGlobals->maxClients)
        return 0;
    
    CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
    
    if (pPlayer->ingame)
    {
        cell *cpPing = get_amxaddr(amx, params[2]);
        cell *cpLoss = get_amxaddr(amx, params[3]);
        int ping, loss;
        PLAYER_CNX_STATS(pPlayer->pEdict, &ping, &loss);
        *cpPing = ping;
        *cpLoss = loss;
        
        return 1;
    }
    
    return 0;
}
so - it shouldn't be a problem. Sorry for bothering.
  
Reply With Quote