Junior Member
Join Date: Mar 2019
Location: Israel
|
10-04-2020
, 13:25
Re: [ANY] Fake VAC Ban
|
#49
|
Quote:
Originally Posted by K1lleR_gamea
PHP Code:
#pragma semicolon 1
#define DEBUG
#define PLUGIN_AUTHOR "Brrdy"
#define PLUGIN_VERSION "1.0.3"
ConVar cPrefix;
ConVar g_cPluginEnabled;
bool g_bPluginEnabled;
char g_szTag[64];
#include <sourcemod>
public Plugin myinfo = {
name = "[ANY] FakeVAC",
author = PLUGIN_AUTHOR,
description = "Fake VAC Ban",
version = PLUGIN_VERSION,
url = "https://forums.alliedmods.net/showthread.php?t=259350"
};
public void OnPluginStart(){
RegConsoleCmd("sm_fv", Cmd_FV);
cPrefix = CreateConVar("sm_fakevac_prefix", "[VAC]", "Chat prefix for plugin usage.");
g_cPluginEnabled = CreateConVar("sm_fakevac_enabled", "1", "Enable or Disable plugin features", 0, true, 0.0, true, 1.0);
CreateConVar("sm_fakevac_version", PLUGIN_VERSION);
AutoExecConfig(true, "sm_fakevac", "Brrdy");
g_cPluginEnabled.AddChangeHook(OnConVarChanged);
LoadTranslations("common.phrases");
}
public void OnConfigsExecuted(){
cPrefix.GetString(g_szTag, sizeof(g_szTag));
}
public void OnConVarChanged(ConVar convar, const char[] oldValue, const char[] newValue){
g_bPluginEnabled = g_cPluginEnabled.BoolValue;
}
public Action Cmd_FV(int client, int args){
if (!g_bPluginEnabled){
return Plugin_Stop;
}
if (IsValidClient(client)){
char szArg[32];
GetCmdArg(1, szArg, sizeof(szArg));
if (args < 1){
PrintToChat(client, " \x10%s\x01 Usage: sm_fv \x04<client>\x01.", g_szTag);
return Plugin_Handled;
}
int iTarget = FindTarget(client, szArg, true, true);
if (iTarget != 1){
PrintToChatAll(" \x07%N has been permanently banned from official CS:GO servers.", iTarget);
KickClient(iTarget, "VAC banned from secure servers.");
}
} else {
PrintToChat(client, " \x10%s\x01 You do not have access to this command.", g_szTag);
return Plugin_Handled;
}
return Plugin_Handled;
}
stock bool IsValidClient(int client){
return (client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && !IsFakeClient(client) && CheckCommandAccess(client, "sm_admin", ADMFLAG_GENERIC));
}
I sometimes wonder if anyone is using it
|
PHP Code:
#pragma semicolon 1
#define DEBUG
#define PLUGIN_AUTHOR "Brrdy"
#define PLUGIN_VERSION "1.0.4"
#define PREFIX "[VAC]"
#include <sourcemod>
public Plugin myinfo = {
name = "[ANY] FakeVAC",
author = PLUGIN_AUTHOR,
description = "Fake VAC Ban",
version = PLUGIN_VERSION,
url = "https://forums.alliedmods.net/showthread.php?t=259350"
};
public void OnPluginStart(){
RegConsoleCmd("sm_fv", Cmd_FV);
LoadTranslations("common.phrases");
}
public Action Cmd_FV(int client, int args){
if (IsValidClient(client) && !IsAdmin(client)){
PrintToChat(client, " \x10%s\x01 You do not have access to this command.", PREFIX);
return Plugin_Handled;
}
if (IsValidClient(client) && IsAdmin(client)){
Menu_FakeVAC(client);
}
return Plugin_Handled;
}
void Menu_FakeVAC(int client){
Menu menu = new Menu(MenuCallBack_FakeVAC, MENU_ACTIONS_ALL);
menu.SetTitle("%s Fake VAC \nSelect a Player", PREFIX);
char szName[MAX_NAME_LENGTH];
for (int i = 1; i <= MaxClients; i++){
if (IsValidClient(i)){
Format(szName, sizeof(szName), "%N", i);
menu.AddItem(szName, szName);
}
}
menu.ExitButton = true;
menu.Display(client, MENU_TIME_FOREVER);
}
public int MenuCallBack_FakeVAC(Menu menu, MenuAction mAction, int param1, int param2){
if (mAction == MenuAction_Select){
char szItem[32];
menu.GetItem(param2, szItem, sizeof(szItem));
int iTarget = FindTarget(param2, szItem, true, false);
if (iTarget == -1 || !IsValidClient(iTarget)){
PrintToChat(param1, " \x10%s\x01 Target \x07(%N)\x01 is not \x07available\x01.", PREFIX, iTarget);
return;
}
KickClient(iTarget, "VAC banned from secure servers.");
PrintToChatAll(" \x07%N has been permanently banned from official CS:GO servers.", iTarget);
Menu_FakeVAC(param1);
} else if (mAction == MenuAction_End){
delete menu;
}
}
stock bool IsAdmin(int client){
if (client >= 1 && client <= MaxClients && CheckCommandAccess(client, "", ADMFLAG_GENERIC)){
return true;
}
return false;
}
stock bool IsValidClient(int client){
if (client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && !IsFakeClient(client)){
return true;
}
return false;
}
new one
|
|