.:: 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
Transfering alive bot to the other team
Old
  (#1)
Bend3R
Member
 
Status: Offline
Posts: 50
Join Date: Jun 2005
Default Transfering alive bot to the other team - 03-11-2010

I use custom plugins on my server and a plugin use to transfer alive players to the other team temporary.
This is a problem for bots because they act like they aren't switched over to the other team.
If its hard to understand, take Zombie Plague with infection as example.
  
Reply With Quote
Re: Transfering alive bot to the other team
Old
  (#2)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,424
Join Date: Apr 2004
Default Re: Transfering alive bot to the other team - 03-11-2010

This is Your custom plugin's problem, not podbot mm problem. Actually it comes from metamod which blocks messages sent by other mm plugins. So AMX X is sending TeamInfo messages, but they cannot be captured by podbot mm (this is how metamod works). To skip that problem AMX X coders have to use emessages - those aren't blocked by metamod.
Example of code:
Code:
(...)
        // Turn the rest of players into humans
        for (id = 1; id <= g_maxplayers; id++)
        {
            // Only those of them who aren't zombies
            if (!is_user_alive(id) || g_zombie[id])
                continue
            
            // Remove previous tasks
            remove_task(id+TASK_TEAM)
            
            // Switch to CT
            if (fm_get_user_team(id) != CS_TEAM_CT) // need to change team?
            {
                fm_set_user_team(id, CS_TEAM_CT)
                set_task(0.1+g_teams_i, "fm_set_user_team_msg", id+TASK_TEAM)
                g_teams_i += 0.1; // increase teams task counter
            }
        }
(...)
// Get User Team
stock fm_get_user_team(id)
{
    return get_pdata_int(id, OFFSET_CSTEAMS, OFFSET_LINUX);
}

// Set a Player's Team
stock fm_set_user_team(id, team)
{
    set_pdata_int(id, OFFSET_CSTEAMS, team, OFFSET_LINUX);
}

// Send User Team Message
public fm_set_user_team_msg(taskid)
{
    // Beware: this message can now be picked up by other metamod
    // plugins (yeah, that includes AMXX plugins as well)
    
    // Set the switching team flag
    g_switchingteam[ID_TEAM] = true;
    
    // Tell everyone my new team
    emessage_begin(MSG_ALL, g_msgTeamInfo)
    ewrite_byte(ID_TEAM)
    
    switch (fm_get_user_team(ID_TEAM))
    {
        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()
    
    // Done switching team
    g_switchingteam[ID_TEAM] = false;
}
  
Reply With Quote
Re: Transfering alive bot to the other team
Old
  (#3)
Bend3R
Member
 
Status: Offline
Posts: 50
Join Date: Jun 2005
Default Re: Transfering alive bot to the other team - 23-11-2010

Alright, since I don't have the source code of the AMXX plugin so is this code not in need.
Do you have any modified metamod module compiled for Windows or can you do a modified version for me which solve this?
If so, I don't use any zombie plugin so check for Terrorist.
Appreciate all help I can get to find a solution for this outside of the AMXX plugin.

Last edited by Bend3R; 23-11-2010 at 03:36..
  
Reply With Quote
Re: Transfering alive bot to the other team
Old
  (#4)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,424
Join Date: Apr 2004
Default Re: Transfering alive bot to the other team - 23-11-2010

When I have time I'll take a look at the latest Zombie Plague plugin version.
  
Reply With Quote
Re: Transfering alive bot to the other team
Old
  (#5)
Bend3R
Member
 
Status: Offline
Posts: 50
Join Date: Jun 2005
Default Re: Transfering alive bot to the other team - 23-11-2010

Latest Zombie Plague version?
Just told you I do not use any zombie plugin.
  
Reply With Quote
Re: Transfering alive bot to the other team
Old
  (#6)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,424
Join Date: Apr 2004
Default Re: Transfering alive bot to the other team - 23-11-2010

Quote:
Originally Posted by Bend3R View Post
If its hard to understand, take Zombie Plague with infection as example.
You told me to take Zombie Plague to understand the problem.
If You don't have source code (sma) of the plugin which is transferring alive players to the other team, I cannot help You. I'm not mainatining metamod and that will not be changed in metamod, so I cannot give You a "better" version of metamod. The only way is to find the source of Your plugin, change and compile it. Where did You download it from?
  
Reply With Quote
Re: Transfering alive bot to the other team
Old
  (#7)
Bend3R
Member
 
Status: Offline
Posts: 50
Join Date: Jun 2005
Default Re: Transfering alive bot to the other team - 23-11-2010

Won't this work?
Quote:
Originally Posted by Bend3R
If so, I don't use any zombie plugin so check for Terrorist.
It only transfer a normal CT/T to the other team. Like PTB do when the round ends.

Last edited by Bend3R; 23-11-2010 at 14:03..
  
Reply With Quote
Re: Transfering alive bot to the other team
Old
  (#8)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,424
Join Date: Apr 2004
Default Re: Transfering alive bot to the other team - 23-11-2010

"Like" PTB or it is just PTB plugin?
Can You tell the exact name of the plugin (with a link) You have troubles with? I mean - to that exact plugin's author I can pm with info what he has to do to make his plugin metamod bots compatible.
  
Reply With Quote
Re: Transfering alive bot to the other team
Old
  (#9)
Bend3R
Member
 
Status: Offline
Posts: 50
Join Date: Jun 2005
Default Re: Transfering alive bot to the other team - 23-11-2010

A friend of mine did this and he's been inactive for about a half year now.
It's named war3ft.

Last edited by Bend3R; 23-11-2010 at 16:59..
  
Reply With Quote
Re: Transfering alive bot to the other team
Old
  (#10)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,424
Join Date: Apr 2004
Default Re: Transfering alive bot to the other team - 23-11-2010

Are You using this version?
  
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 - 2019, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com