Half-Life и Adrenaline Gamer форум
http://aghl.ru/forum/

make bots ignore attack some models (players) ?
http://aghl.ru/forum/viewtopic.php?f=12&t=2820
Страница 1 из 1

Автор:  abdobiskra [ 10 ноя 2017, 16:41 ]
Заголовок сообщения:  make bots ignore attack some models (players) ?

Hello
I have changed the model for the team players (each player has his own model in the same team)
In this case I have some bots who are cheak to that player in the same team through the models
So they shoot the players in the same team because they do not has the same model
I checked it out when I gave all the players god Mod would ignore it (mean dont shoot players in the same team who has different model)
From here I thought that if given godmodes among the team players only I'll get rid of this problem .
or is there another way to do it?

Автор:  Lev [ 10 ноя 2017, 21:54 ]
Заголовок сообщения:  Re: make bots ignore attack some models (players) ?

Hi.
Probably there is no easy way. Only to change bots code to use not models, but some other thing to detect teams and fix gamedll too (this part can be done thru the amxx).

Автор:  abdobiskra [ 10 ноя 2017, 22:34 ]
Заголовок сообщения:  Re: make bots ignore attack some models (players) ?

thank you for replying.
Maybe I will not do it at all since it is not easy at amxx :unknown:
I used several attempts but failed:
http://codepad.org/DCHjjGlA
http://codepad.org/GmpOCD0f
http://codepad.org/U2Fn28nT

Автор:  Lev [ 11 ноя 2017, 02:33 ]
Заголовок сообщения:  Re: make bots ignore attack some models (players) ?

You can handle it this way, but this will be normal for humans only. Bots will continue to try to shoot teammates with different models.
Probably it could be done with metamod plugin. If you will hook all g_engfuncs.pfnInfoKeyValue(buffer, "model") calls and return appropriate values while keep them different on engine and client sides.

Автор:  abdobiskra [ 12 ноя 2017, 00:49 ]
Заголовок сообщения:  Re: make bots ignore attack some models (players) ?

What about if i could hook addtofullpack and check whether the receiving host is a bot. If he is, myb i can set entity state model to same model as bot, so he will not shoot. so i think in this case i can ignore regular players in the function ?

Автор:  Lev [ 12 ноя 2017, 02:47 ]
Заголовок сообщения:  Re: make bots ignore attack some models (players) ?

Bots working differently. For example, jkbotti thinks in StartFrame.
Код:
static void StartFrame(void)
{
      for (bot_index = 0; bot_index < gpGlobals->maxClients; bot_index++)
      {
         if (bots[bot_index].is_used)   // is this slot used
         {
            if (gpGlobals->time >= bots[bot_index].bot_think_time)
            {
               BotThink(bots[bot_index]);
So, I suppose they shoot players in there. And addtofullpack doesn't relates here at all.

Страница 1 из 1 Часовой пояс: UTC + 5 часов [ Летнее время ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/