Thread: Kill bots
View Single Post
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-09-2013 , 01:56   Re: Kill bots
Reply With Quote #4

ok ive never worked with CSCZ, or the bots with CZ.. but i make up a quick code... might not work but here you go.
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Kill Bots After No Alive Players" #define VERSION "1.0" #define AUTHOR "Blizzard" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_event( "DeathMsg", "Event_DeathMsg", "a" ); } public Event_DeathMsg() {     new Players[ 32 ], iNum, i, player;     get_players( Players, iNum, "ac" );     for( i = 0; i < iNum; i++ )     {         player = Players[ i ];         if( !player)         {             set_task(5.0, "KillBots", 0 );         }     } } public KillBots() {     new Players[ 32 ], iNum, i, bots;     get_players( Players, iNum, "d" );     for( i = 0; i < iNum; i++ )     {         bots = Players[ i ];         user_kill( bots );     } }

EDIT: fixed making sure it checks if No Real players alive.
__________________

Last edited by Blizzard_87; 05-09-2013 at 01:59.
Blizzard_87 is offline