AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   PODBOT not reacting to auto bomb plant. (https://forums.alliedmods.net/showthread.php?t=340411)

GoldNux 11-16-2022 09:58

PODBOT not reacting to auto bomb plant.
 
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.

bibu 11-17-2022 07:35

Re: PODBOT not reacting to auto bomb plant.
 
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.

GoldNux 11-17-2022 10:07

Re: PODBOT not reacting to auto bomb plant.
 
Quote:

Originally Posted by bibu (Post 2793012)
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(); 


bibu 11-18-2022 08:27

Re: PODBOT not reacting to auto bomb plant.
 
Try the method by Connormcleod and after from Arkshine:

https://forums.alliedmods.net/showthread.php?t=125311


All times are GMT -4. The time now is 15:42.

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