.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Bug Reports (http://forums.bots-united.com/forumdisplay.php?f=49)
-   -   Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)" (http://forums.bots-united.com/showthread.php?t=6758)

AlexBreems 30-04-2008 20:16

Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
Bot do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)" (I give a command in "DeathMsg")

I use PodBotMM V3B19f

It's a bug???

KWo 01-05-2008 07:39

Re: Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
Why do You need to clean this in DeathMessage? It should be cleaned anyway by CS engine, when the bot/player is dead. Attach the code of all Your plugin, than we can talk a bit more detailed. More than likely metamod is blocking this message so it cannot be reached by a bot (so the bot doesn't know anything about Your message concerning the defuser).

AlexBreems 01-05-2008 08:13

Re: Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
I do it that Defuse Kit did not drop out after death

The Storm 01-05-2008 12:01

Re: Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
Really? lol

AlexBreems 01-05-2008 17:14

Re: Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
The same principle of work in the relation "Defuse Kit" at a plugin "No Weapon Drop" by VEN

Bold font a piece from a plugin responsible for it:

public event_death() {
new id = read_data(2)
if (!(get_pcvar_num(g_pcvar_state) & FLAG_DEAD) || !(get_pcvar_num(g_pcvar_teams) & FLAG_CT) || !cs_get_user_defuse(id))
return

if (CONTAIN_FLAG_OF_INDEX(get_pcvar_num(g_pcvar_allow ), DEFUSER))
return

cs_set_user_defuse(id, 0)
set_pev(id, pev_body, 0) // backward compatibility

}

KWo 02-05-2008 07:21

Re: Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
And I believe that one is also not working with metamod bots (because of the same reasons).

AlexBreems 02-05-2008 07:58

Re: Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
You consider that a problem not in PodBotMM and in Metamod?

KWo 02-05-2008 12:01

Re: Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
Eaxctly - if the bot code cannot see the messages blocked by metamod, what I can do with this in bot code?

AlexBreems 02-05-2008 12:42

Re: Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
I have found a way out (bold font):

public event_death() {
new id = read_data(2)
if (!(get_pcvar_num(g_pcvar_state) & FLAG_DEAD) || !(get_pcvar_num(g_pcvar_teams) & FLAG_CT) || !cs_get_user_defuse(id))
return

if (CONTAIN_FLAG_OF_INDEX(get_pcvar_num(g_pcvar_allow ), DEFUSER))
return

cs_set_user_defuse(id, 0)
set_pev(id, pev_body, 0) // backward compatibility
set_task(0.1, "task", id)
}

public task(id) {
cs_set_user_defuse(id, 1)
}

KWo 02-05-2008 20:54

Re: Do not buy Defuse Kit after AMXX command "cs_set_user_defuse (id, 0)"
 
So that means Your plugin was just too fast - it was adding the defuser to the dead bot right before CS engine was reseting it. Now You delayed and it works. Good to know the trick. :)


All times are GMT +2. The time now is 01:07.

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