Raised This Month: $51 Target: $400
 12% 

Kill bots


Post New Thread Reply   
 
Thread Tools Display Modes
cstrike37
Member
Join Date: Jan 2012
Old 05-09-2013 , 20:36   Re: Kill bots
Reply With Quote #11

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
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-10-2013 , 00:07   Re: Kill bots
Reply With Quote #12

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Kill Bots After No Alive Players"
#define VERSION "1.0"
#define AUTHOR "Blizzard"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event"DeathMsg""Event_DeathMsg""a" );
}

public 
Event_DeathMsg()
{
    new 
Players32 ], iNum;
    
get_playersPlayersiNum"ac" );
    if (
iNum == 0)
        
set_task(5.0"KillBots" );
}

public 
KillBots()
{
    
server_cmd("bot_kill");

__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 05-10-2013 at 00:08.
YamiKaitou is offline
Reply



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


All times are GMT -4. The time now is 23:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode