View Single Post
dustinandband
Senior Member
Join Date: May 2015
Old 07-15-2019 , 03:08   Re: disable the kick through the menu. HELP
Reply With Quote #3

PHP Code:
#pragma semicolon 1
#pragma newdecls required
 
//Sourcemod Includes
#include <sourcemod>

public Plugin myinfo =
{
    
name "[L4D2] block kick votes",
    
author "",
    
description "",
    
version "1.0.0",
    
url ""
};

public 
void OnPluginStart()
{
    
AddCommandListener(Listener_CallVote"callvote");
}

public 
Action Listener_CallVote(int client, const char[] commandint argc)
{
    
char sIssue[64];
    
GetCmdArg(1sIssuesizeof(sIssue));
    
    if (
StrEqual(sIssue"kick"false) && !isValidAdmin(client))
    {
        
PrintToChat(client"[SM] kick votes blocked.");
        return 
Plugin_Handled;
        
    }
    
    return 
Plugin_Continue;
}

public 
bool isValidAdmin(int client)
{
    return 
client <= MaxClients && GetUserAdmin(client) != INVALID_ADMIN_ID;

dustinandband is offline