View Single Post
mynameisjanjan
Junior Member
Join Date: Feb 2017
Old 10-19-2018 , 07: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