.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Common Questions (http://forums.bots-united.com/forumdisplay.php?f=51)
-   -   Transfering alive bot to the other team (http://forums.bots-united.com/showthread.php?t=8087)

Bend3R 03-11-2010 17:48

Transfering alive bot to the other team
 
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.

KWo 03-11-2010 21:37

Re: Transfering alive bot to the other team
 
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;
}


Bend3R 23-11-2010 00:41

Re: Transfering alive bot to the other team
 
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.

KWo 23-11-2010 09:40

Re: Transfering alive bot to the other team
 
When I have time I'll take a look at the latest Zombie Plague plugin version.

Bend3R 23-11-2010 12:37

Re: Transfering alive bot to the other team
 
Latest Zombie Plague version?
Just told you I do not use any zombie plugin.

KWo 23-11-2010 12:52

Re: Transfering alive bot to the other team
 
Quote:

Originally Posted by Bend3R (Post 62548)
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?

Bend3R 23-11-2010 13:37

Re: Transfering alive bot to the other team
 
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.

KWo 23-11-2010 14:16

Re: Transfering alive bot to the other team
 
"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.

Bend3R 23-11-2010 14:57

Re: Transfering alive bot to the other team
 
A friend of mine did this and he's been inactive for about a half year now.
It's named war3ft.

KWo 23-11-2010 17:58

Re: Transfering alive bot to the other team
 
Are You using this version?


All times are GMT +2. The time now is 11:51.

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