Thread: Kill bots
View Single Post
cstrike37
Member
Join Date: Jan 2012
Old 05-09-2013 , 20:36   Re: Kill bots
Reply With Quote #9

Quote:
Originally Posted by Blizzard_87 View Post
cstrike37 use this link it states it works with more then one kind of bots.
It's to understand that code lol and I don't know where to put it so..
I used this https://forums.alliedmods.net/showthread.php?p=22034

I just added the public KillBots and set_task from ur code

I added these two:
PHP Code:
set_task(5.0"KillBots"
PHP Code:
public KillBots()
{
    new 
Players32 ], iNumibots;
    
get_playersPlayersiNum"d" );
    for( 
0iNumi++ )
    {
        
bots Players];
        
user_killbots );
    }

and replaced
PHP Code:
stock kill_bots() {
    
    for(new 
<= g_iMaxPlayers i++) {
        
        if(
is_user_bot(i)) {
            
            
user_kill(i,1)
        }
    }

with set task and it worked perfectly

Thanks!

Last edited by cstrike37; 05-09-2013 at 20:42.
cstrike37 is offline