Raised This Month: $51 Target: $400
 12% 

PODBOT not reacting to auto bomb plant.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GoldNux
Senior Member
Join Date: Mar 2018
Old 11-16-2022 , 09:58   PODBOT not reacting to auto bomb plant.
Reply With Quote #1

The plugin I'm working on plants the bomb automatically, testing it with bots they only rush the site when a player or bot manually plants the bomb.

Does anyone know if I can get them to rush the site when bomb is planted automatically?
Can I invoke the https://www.amxmodx.org/api/csx/bomb_planted event somehow?

Thanks.

Last edited by GoldNux; 11-16-2022 at 10:27.
GoldNux is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 11-17-2022 , 07:35   Re: PODBOT not reacting to auto bomb plant.
Reply With Quote #2

Show us how you are doing the bomb plant automatically? There might be a variable which needs to be set in order to "tell" the bots that the bomb has been planted.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
GoldNux
Senior Member
Join Date: Mar 2018
Old 11-17-2022 , 10:07   Re: PODBOT not reacting to auto bomb plant.
Reply With Quote #3

Quote:
Originally Posted by bibu View Post
Show us how you are doing the bomb plant automatically? There might be a variable which needs to be set in order to "tell" the bots that the bomb has been planted.
Thanks for responding.
This is called on newRound(),

PHP Code:
    new mapname[31]
    
get_mapname(mapname,31)
    new 
Float:origin[3];
    new 
rngBomb
    rngBomb 
random_num(1,100)
    if(
equali(mapname"de_dust2"))
    {
        if (
rngBomb 70)
        {
            
origin[0] = -1360.031250
            origin
[1] = 2575.968750
            origin
[2] = 47.417095
        
}
        else if (
rngBomb 30)
        {
            
origin[0] = -1629.973022
            origin
[1] = 2495.968750
            origin
[2] = 36.031250
        
}
        else
        {
            
origin[0] = -1630.511841
            origin
[1] = 2592.031250
            origin
[2] = 36.031250
        
}
    }
    else if(
equali(mapname"de_inferno"))
    {
        if (
rngBomb 70)
        {
            
origin[0] = 2097.071045
            origin
[1] = 442.607361
            origin
[2] = 196.031250
        
}
        else if (
rngBomb 30)
        {
            
origin[0] = 2070.960693
            origin
[1] = 183.968750
            origin
[2] = 196.031250
        
}
        else
        { 
            
origin[0] = 2070.960693
            origin
[1] = 183.968750
            origin
[2] = 196.031250
        
}
    }
// Create C4 at that location.
    
new iEntity create_entity("weapon_c4");
    if(!
iEntity)
        return;
    
DispatchKeyValue(iEntity"detonatedelay"0);
    
DispatchSpawn(iEntity);
    
engfunc(EngFunc_SetOriginiEntityorigin);
    
force_use(iEntityiEntity);
    
client_cmd(0"spk radio/bombpl")

    
// Set bomb location on radar and remove the timer.
    
message_begin(MSG_ALLget_user_msgid("BombDrop"), {0,0,0}, 1)
    
engfunc(EngFunc_WriteCoordorigin[0]);
    
engfunc(EngFunc_WriteCoordorigin[1]);
    
engfunc(EngFunc_WriteCoordorigin[2]);
    
write_byte(1);
    
message_end(); 

Last edited by GoldNux; 11-17-2022 at 10:09.
GoldNux is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 11-18-2022 , 08:27   Re: PODBOT not reacting to auto bomb plant.
Reply With Quote #4

Try the method by Connormcleod and after from Arkshine:

https://forums.alliedmods.net/showthread.php?t=125311
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode