I'm Polish, so please be patient reading this

I have installed and configured:
1. MetaMod 1.17.1
2. AMX 0.9.9
2. PODBot v2.6mm with new DLL v2.46a
I have problem with amount of bots.
While real people are entering the game something crashes. I'm using my own plugin (code below) and function from amx
get_players give me untrue information like this: all players are 2, but for real on the server are 5 people!
Another example: max_bots is set to 10. Bots are placed is CT and T by 5 for each team. To game comming 3 people. One Bot is missing, but two another are still plaing in CT (there are 1 real player in T and 4 Bots, and 2 real players in CT and 4 Bots).
I didn't know were post this problem, but I think all is dependend by PODBot.
May PODBot dll cause a problems with data stored by metamod engine or amx?
Below is code of my script, I almost sure it's OK.
#include <amxmod>
/* balance numbers */
//new autoteamnum = 5
/* addbot switch for ensuring add a bot one time */
//new ctswitch = 0
new arePeople = -1
// all global to get less cpu usage
new ip[17]
new realplayers[32], aliveplayers[32], spectators[32]
new realnum, real, alivenum, alivepeoplenum, spectatorsnum
new i
// checks if the player is bot or real player by ip and name on the same time
public is_user_bot_by_ip (id) {
get_user_ip (id, ip, 16, 1)
if (equal (ip, "127.0.0.1", 9)) return 1
return 0
}
/* balance adjust */
public auto_kill() {
// chceking if we want to kill bots
if (!get_cvar_num ("zabijaj_boty") return 0
// get all of the players, and then check how mach are real players
get_players (realplayers, real)
server_print ("Number of players: %d", real)
realnum = real
for (i = 0; i < real; i++)
if (is_user_bot_by_ip (realplayers [i])) realnum--
// a means to don't return dead players, and then we check how much are real players
get_players (aliveplayers, alivenum, "a")
real = alivenum
alivepeoplenum = real
for (i = 0; i < real; i++)
if (is_user_bot_by_ip (aliveplayers [i])) alivepeoplenum--
get_players (spectators, spectatorsnum, "e", "SPECTATOR")
server_print ("REAL PLAYERS: %d", realnum)
server_print ("SPECTATORS: %d", spectatorsnum)
server_print ("ALIVE PEOPLE: %d", alivepeoplenum)
// turn bots off if no people are on the server
if (realnum && (arePeople == -1)) arePeople = 0
if (!realnum && (arePeople == -1)) arePeople = 1
if (!realnum && arePeople) {
arePeople = 0
server_cmd ("pb removebots")
return 0 // no other operations are required
}
if (realnum && !arePeople) {
arePeople = 1
server_cmd ("pb fillserver")
return 0
}
/* killing bots, when all players are down */
if ((realnum - spectatorsnum > 0) && !alivepeoplenum) server_cmd ("pb killbots")
return 0
}
public plugin_init() {
register_plugin("AutoKillBots","0.1","default")
register_cvar ("zabijaj_boty", "1", FCVAR_SERVER | FCVAR_EXTDLL | FCVAR_UNLOGGED | FCVAR_SPONLY)
set_task(10.0, "auto_kill", 0, "", 0, "b")
return PLUGIN_CONTINUE
}