.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   BOT tag (http://forums.bots-united.com/showthread.php?t=5330)

jeefo 31-05-2006 21:19

BOT tag
 
If anybody need this, there is a way to display a "BOT" tag for bot ping, instead of empty field in Counter-Strike 1.6 scoreboard, like Official Counter-Strike Bot does. :)

All you needed is add:
PHP Code:

SET_CLIENT_KEYVALUE (iClientIndexpszBuffer"*bot""1"); 

into your bot creation code. :)

KWo 03-06-2006 09:44

Re: BOT tag
 
Did You try to check it with the AMX plugin - high_ping_analyzer (it's called so or somewhat similar)? Not sure - but I'm afraiding it may cause a crash of AMX. :D

The Storm 03-06-2006 11:30

Re: BOT tag
 
So AMX crash when we play with the official CS bot? :D

jeefo 03-06-2006 12:29

Re: BOT tag
 
I'm don't think so, BOT tag added to scoreboard, in CS client dll. I think that plugin uses
PHP Code:

void (*pfnGetPlayerStats) (const edict_t *pClientint *pingint *packet_loss); 

So i think there is no such problems. :)

KWo 03-06-2006 20:14

Re: BOT tag
 
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. ;)


All times are GMT +2. The time now is 10:45.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.