.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > POD-Bot mm > Common Questions
Common Questions Are you seeking help ? Get it here !

Reply
 
Thread Tools
BOT confusing after transfered
Old
  (#1)
aba010
Member
 
Status: Offline
Posts: 8
Join Date: Jun 2010
Default BOT confusing after transfered - 25-06-2010

My server has installed ptb.amxx, which swap players when it checks team unbalance. The problem is after the bots has been transfered, they thought they are still in another team and keep trying to shoot at me.
For example, at first BOT A and BOT B in CT, then I joined T and played a few rounds. PTB checks that CT is stronger and automatically transfer BOT A to T. Now, BOT A will try to shoot me untill he see BOT B or any CT members.
Anyone know how to fix that?
  
Reply With Quote
Re: BOT confusing after transfered
Old
  (#2)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: BOT confusing after transfered - 26-06-2010

This is not pb mm bug nor issue. This is metamod problem which blocks standard messges sent by other plugins (i.e. amxmodx messages are blocked so pb mm cannot intercept/handle them). You need to ask ptb plugin developer to rewrite it to use emassages. If he is just using set_user_team or cs_set_user team none of metamod bots can see messges sent by those functions. Thus bots don't know they have been transferred into opposite team. Example of working code below.
Code:
(...)
    fm_set_user_team(id, team); // call the function to change the team by the user
    cs_reset_user_model( id );
(...)

stock fm_set_user_team(id, team)
{
    set_pdata_int(id, OFFSET_CSTEAMS, team, OFFSET_LINUX);
    fm_set_user_team_msg(id);
}

// Send User Team Message
public fm_set_user_team_msg(id)
{
    // Beware: this message can now be picked up by other metamod
    // plugins (yeah, that includes AMXX plugins as well)
        
    // Tell everyone my new team
    emessage_begin(MSG_ALL, g_msgTeamInfo)
    ewrite_byte(id)
    switch (fm_get_user_team(id))
    {
        case CS_TEAM_UNASSIGNED: ewrite_string("UNASSIGNED");
        case CS_TEAM_T: ewrite_string("TERRORIST");
        case CS_TEAM_CT: ewrite_string("CT");
        case CS_TEAM_SPECTATOR: ewrite_string("SPECTATOR");
    }    
    emessage_end()
}

stock fm_get_user_team(id)
{
    return get_pdata_int(id, OFFSET_CSTEAMS, OFFSET_LINUX);
}
  
Reply With Quote
Re: BOT confusing after transfered
Old
  (#3)
aba010
Member
 
Status: Offline
Posts: 8
Join Date: Jun 2010
Default Re: BOT confusing after transfered - 26-06-2010

Thank you. Since the author haven't update for a long time, I'm not sure this problem can be fixed. But anyway, Thanks.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com