Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request if self is bot do this
#1
in mw2 there was if( self isBot() ). in bo what i have to write?
Reply

#2
Code:
if(isdefined(self.pers["isbot"] && self.pers["isbot"]));
{
//he's a bot
}
[Image: MaEIQ.png]
Reply

#3
self.pers["isBot"]
Reply

#4
I want this:
Code:
            for(i = 0; i < level.players.size; i++)
            {
                    Kick(level.players[i] GetEntityNumber());
                    
            }

kick only bot
Reply

#5
(08-04-2011, 11:34)Puffiamo Wrote: I want this:


kick only bot

Code:
            for(i = 0; i < level.players.size; i++)
            {
if(isdefined(level.players[i].pers["isbot"]) && level.players[i].pers["isbot"]){
                    Kick(level.players[i] GetEntityNumber());}
                    
            }

is that so hard with the code I already gave you?
[Image: MaEIQ.png]
Reply

#6
(08-04-2011, 11:36)Pozzuh Wrote:
(08-04-2011, 11:34)Puffiamo Wrote: I want this:


kick only bot

Code:
            for(i = 0; i < level.players.size; i++)
            {
if(isdefined(level.players[i].pers["isbot"]) && level.players[i].pers["isbot"]){
                    Kick(level.players[i] GetEntityNumber());}
                    
            }

is that so hard with the code I already gave you?

Doesnt work, yes is hard
Reply

#7
if that doesn't work soemthing else is wrong
[Image: MaEIQ.png]
Reply

#8
What is wrong?

Code:
        if(response == "bot_kick" )
        {
            self closeMenu();
            self closeInGameMenu();
            for(i = 0; i < level.players.size; i++)
            {
                if(isdefined(level.players[i].pers["isbot"]) && level.players[i].pers["isbot"])
                {
                    Kick(level.players[i] GetEntityNumber());
                }
                    
            }
            continue;
        }
Reply

#9
try

Code:
        if(response == "bot_kick" )
        {
            self closeMenu();
            self closeInGameMenu();
            for(i = 0; i < level.players.size; i++)
            {
                if(isdefined(level.players[i].pers["isbot"]) && level.players[i].pers["isbot"])
                {
                                        iprintlnbold(level.players[i].name + " should be kicked");
                    //Kick(level.players[i] GetEntityNumber());
                }
                    
            }
            continue;
        }

and see if you see any thing.
[Image: MaEIQ.png]
Reply

#10
Nothing Sad
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.