PHP Code:
#include <amxmodx>
#include <amxmisc>
new g_aSlot = 1
public plugin_init()
{
register_plugin("AmxBans Admin Base", "2.5", "Sutar")
}
public client_authorized(id)
{
if(!access(id, ADMIN_RESERVATION))
{
if(get_playersnum(1) >= (get_maxplayers() - g_aSlot))
{
server_cmd("kick #%d Извините, нет места для игроков!", get_user_userid(id))
return PLUGIN_HANDLED
}
}
return PLUGIN_CONTINUE
}
try changing plugin continue to handled, i think that should do it
Quote:
Possible error in the:
-->
|
get_playersnum(1) will return also players connecting to the server
get_playersnum() not
__________________