I have a server, it can be 17 players.
1st place for the administrator.
16 places for the players.
When the server has 15 players at the entrance of the sixteenth - is disabled and says that there is no space.
Although it should be disabled when the server is 16 people.
Here's the script:
Code:
public client_authorized(id)
{
accessUser(id)
if(!access(id, ADMIN_RESERVATION))
{
if(get_playersnum(1) >= (get_maxplayers() - g_aSlot))
{
server_cmd("kick #%d ^"There is no place.^"", get_user_userid(id))
return PLUGIN_CONTINUE
}
}
return PLUGIN_CONTINUE
}
What is wrong?