Raised This Month: $65 Target: $400
 16% 

Anti Spectator CSGO


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mynameisjanjan
Junior Member
Join Date: Mar 2017
Old 10-09-2018 , 04:40   Anti Spectator CSGO
Reply With Quote #1

is theres any plugin that if your server is full like 10/10 no one can connect to the server anymore by console? cause i having this problem with my server if they see the server is full they will connect using the console and server ip, is theres anyway to prevent or kick spectators in the game automatically?

thanks in advance

Last edited by mynameisjanjan; 10-09-2018 at 04:43.
mynameisjanjan is offline
Lubricant Jam
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 10-09-2018 , 05:17   Re: Anti Spectator CSGO
Reply With Quote #2

Disable reserved slots.
Lubricant Jam is offline
mynameisjanjan
Junior Member
Join Date: Mar 2017
Old 10-09-2018 , 05:43   Re: Anti Spectator CSGO
Reply With Quote #3

how to disable that sir?

Hello. I have my CS:GO server with "10" slots.

I set 10 slots in gamemodes.txt, gamemodes_server.txt and gamemode_competetive.txt

When my server is turned on i see in console "maxplayers set to 64".

My server looks like this: 12/10 ; 15/10.

10 players can play, 5 more are in spectator and can't join to team.

Any help?
mynameisjanjan is offline
Swolly
Member
Join Date: Jul 2018
Old 10-09-2018 , 06:55   Re: Anti Spectator CSGO
Reply With Quote #4

Quote:
Originally Posted by mynameisjanjan View Post
how to disable that sir?

Hello. I have my CS:GO server with "10" slots.

I set 10 slots in gamemodes.txt, gamemodes_server.txt and gamemode_competetive.txt

When my server is turned on i see in console "maxplayers set to 64".

My server looks like this: 12/10 ; 15/10.

10 players can play, 5 more are in spectator and can't join to team.

Any help?
sorry my english bad.
I hard understing but you wanting if server is full kick connecting client?
Swolly is online now
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 10-09-2018 , 06:57   Re: Anti Spectator CSGO
Reply With Quote #5

Quote:
Originally Posted by Lubricant Jam View Post
Disable reserved slots.
Sadly that doesn't work in CS:GO (Maybe they fixed in a recent version haven't played for a while).
The only solution would be a plugin that kicks everybody that connects when all slots are in use.
good_live is offline
mynameisjanjan
Junior Member
Join Date: Mar 2017
Old 10-09-2018 , 07:21   Re: Anti Spectator CSGO
Reply With Quote #6

how can i do that? no one cannot connect to the server if the slot is full, but only admin can connect
mynameisjanjan is offline
cra88y
AlliedModders Donor
Join Date: Dec 2016
Old 10-09-2018 , 18:10   Re: Anti Spectator CSGO
Reply With Quote #7

Untested, but do you mean this kind of thing?
PHP Code:
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>
public Plugin myinfo 
{
    
name "KickWhenFull",
    
author "cra88y",
    
version "1.0"
};
public 
void OnClientPostAdminCheck(int client)
{
    if(
GetClientCount(true) > GetMaxHumanPlayers())
    {
        if (!
IsPlayerAdmin(client))
        {
            
KickClient(client"Server is full! Please try again later.");
        }
    }
}
stock bool IsPlayerAdmin(int client)
{
    if (
IsClientInGame(client) && CheckCommandAccess(client""ADMFLAG_KICK))
        return 
true;
    
    return 
false;

Attached Files
File Type: sp Get Plugin or Get Source (kickwhenfull.sp - 29 views - 633 Bytes)
__________________
PM for paid plugins requests | Support

Last edited by cra88y; 10-09-2018 at 18:21.
cra88y is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 10-09-2018 , 18:13   Re: Anti Spectator CSGO
Reply With Quote #8

https://forums.alliedmods.net/showthread.php?p=2302217
Quote:
Description:
Client limiter is a simple plugin to deal with players connecting to a theoretically full server. It doesn't allow clients to connect beyond sv_visiblemaxplayers value, but of course it also supports reserved flags.
__________________
free software
coding
shanapu is offline
mynameisjanjan
Junior Member
Join Date: Mar 2017
Old 10-19-2018 , 08:23   Re: Anti Spectator CSGO
Reply With Quote #9

Quote:
Originally Posted by cra88y View Post
Untested, but do you mean this kind of thing?
PHP Code:
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>
public Plugin myinfo 
{
    
name "KickWhenFull",
    
author "cra88y",
    
version "1.0"
};
public 
void OnClientPostAdminCheck(int client)
{
    if(
GetClientCount(true) > GetMaxHumanPlayers())
    {
        if (!
IsPlayerAdmin(client))
        {
            
KickClient(client"Server is full! Please try again later.");
        }
    }
}
stock bool IsPlayerAdmin(int client)
{
    if (
IsClientInGame(client) && CheckCommandAccess(client""ADMFLAG_KICK))
        return 
true;
    
    return 
false;


YES whats what im looking for
mynameisjanjan is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:26.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode