Results 1 to 10 of 65

Thread: Changing map on MeatBot (CoD 2)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts

    Changing map on MeatBot (CoD 2)

    Hello,

    Context:

    First of all, I know meatbot is not meant to be played in public / dedicated servers, and the testclients were only meant for tests.
    Although, it is extremely hard to get a CoD2 server populated nowadays (less than 100 players peak playing simultaneously in brazilian servers).
    The last thing I can try to do for my server is add some bots, at least temporarely, to atract players who may like the custom maps I'll use and start playing there frequently, so it will be one of the ~3 frequently populated brazilian servers.
    The reasons I simply don't play in other servers - every single admin is stupid (you can't kill 10 players in a row without being called a cheater and getting kicked, and most of them don't know how to detect wallhackers), high ping from foreign servers, no servers have custom maps (at least the ones I want to play), and no servers use my mod (I'll be posting about it in a couple of weeks).


    My problem:
    The game stops after finishing a map. Map won't rotate, it just keeps showing the score table. Meatbot does not effectively remove the bots it creates - it moves them to spectators, and they just stay there.


    So far, I have successfully editted the meatbot mod and merged with my mod, which has a lot of tools I developed or got from other mods. I tried using meatbot only (without my mod), and the same problem happens, which means it's not coming from my mod.

    Anyway:
    - The endmap funcion of the tdm.gsc from meatbot calls another endmap function, which is at _mbot.gsc and does not remove the bots;
    - The script command for adding bots is addtestclient(), but I don't know if there's a command for deleting it;
    - There is a removebot function in _mbot.gsc, and I coulnd't find any scripts calling it, and I'm not sure if it works.

    Here is the removeBot funcion:

    Code:
    removeBot(team)
    {
    	players = getentarray("player", "classname");
      
      
    	switch(team)
    	{
    		case "allies":
    			for(i = 0; i < players.size; i++)
    			{
    				if (!isDefined(players[i].isbot))
    					continue;
    				if(players[i].pers["team"] == "allies")
    				{
    					//players[i] notify("killed_player"); // Cepe7a
    					//level.bots_al--;
    					players[i] thread botJoin("spectator", "");
    					break;
    				}
    			}
    		break;
    		
    		case "axis":
    			for(i = 0; i < players.size; i++)
    			{
    				if (!isDefined(players[i].isbot))
    					continue;
    				if(players[i].pers["team"] == "axis")
    				{
    					//players[i] notify("killed_player"); // Cepe7a
    					//level.bots_ax--;
    					players[i] thread botJoin("spectator", "");
    					break;
    				}
    			}
    		break;
    		
    		case "all":
    			for(i = 0; i < players.size; i++) 
    			{
    				if (!isDefined(players[i].isbot))
    					continue;
    				players[i] notify("killed_player"); // Cepe7a
    				players[i] thread botJoin("spectator", "");
    			}
    
    			//level.bots_al = 0;
    			//level.bots_ax = 0;
    		break;
    		
    		default:
    			for(i = 0; i < players.size; i++)
    			{
    				if(players[i].name == team)
    				{
    					if(!isdefined(players[i].isbot))
    					{
    						println(players[i].name + " is not a bot");
    						continue;
    					}
    
    /*
    					if(players[i].pers["team"] == "allies")
    						level.bots_al--;
    					else if(players[i].pers["team"] == "axis")
    						level.bots_ax--;
    */
    
    					players[i] notify("killed_player"); // Cepe7a
    					players[i] thread botJoin("spectator", "");
    					break;
    				}
    			}
    		break;
    	}
    }

    _mbot.gsc and tdm.gsc are attached.

    Has anybody got any clues?
    Attached Files Attached Files
    set logfile 2

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •