AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Anti Spectator CSGO (https://forums.alliedmods.net/showthread.php?t=311244)

mynameisjanjan 10-09-2018 03:40

Anti Spectator CSGO
 
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

Lubricant Jam 10-09-2018 04:17

Re: Anti Spectator CSGO
 
Disable reserved slots.

mynameisjanjan 10-09-2018 04:43

Re: Anti Spectator CSGO
 
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?

Swolly 10-09-2018 05:55

Re: Anti Spectator CSGO
 
Quote:

Originally Posted by mynameisjanjan (Post 2618977)
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?

good_live 10-09-2018 05:57

Re: Anti Spectator CSGO
 
Quote:

Originally Posted by Lubricant Jam (Post 2618973)
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.

mynameisjanjan 10-09-2018 06:21

Re: Anti Spectator CSGO
 
how can i do that? no one cannot connect to the server if the slot is full, but only admin can connect

cra88y 10-09-2018 17:10

Re: Anti Spectator CSGO
 
1 Attachment(s)
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;



shanapu 10-09-2018 17:13

Re: Anti Spectator CSGO
 
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.

mynameisjanjan 10-19-2018 07:23

Re: Anti Spectator CSGO
 
Quote:

Originally Posted by cra88y (Post 2619089)
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


All times are GMT -4. The time now is 21:03.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.