View Single Post
Re: New AMX Plug In For RealBot
Old
  (#20)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: New AMX Plug In For RealBot - 12-03-2004

Well, as I'm still developing the script those logging is neccessary for me to see what the script does - and the checks are done every 10 seconds.
If you want get rid of all log messages, edit the "log" function and comment out its content.
Code:
 log(id,text[]) {
 // 	   if (id) {
 // 			   client_print(id,print_console,"[TN-BC|%s] %s", g_botName, text)
 // 	   }
 // 	   log_message("[TN-BC|%s] %s", g_botName, text)
 }
If you only want to disable the "fillslots disabled" logging got to the "checkSlots" function and comment out the second "log" function invocation.
Code:
 public checkSlots() {
 		new snum = g_userCount
 		g_fillSlots = get_cvar_num(g_fillSlotCvar)
 
 		if (g_fillSlots) {
 
 			    // those realbot settings could interfere
 				disableAutoBot()
 
 			    format(g_logLine,80,"number of taken slots: %d/%d (%d %ss)",snum,g_fillSlots,g_botCount,g_botName)
 				log(0,g_logLine)
 
 			    // trivial approach without further checks:
 				if (snum < g_fillSlots) {
 					    addBot(0,2,g_botModel,g_botSkill,"")
 				}
 			    if ((snum > g_fillSlots) && (g_botCount > 0)){
 					    kickBot(0,2)
 				}
 // 	   } else {
 // 			   format(g_logLine,80,"fillslots disabled")
 // 			   log(0,g_logLine)
 		}
 }
Or if you want a bigger interval you have to edit the function set_task in setupCheckSlots. Change the "10.0" to anything you prefer.
Code:
  public setupCheckSlots() {
  		set_task(10.0,"checkSlots",0,"",3,"b")
  }
Afterwards you have to recompile the plugin of course ...

Last edited by Terran; 12-03-2004 at 13:24..
  
Reply With Quote