|
Member
|
09-29-2017
, 01:31
Re: SMAC by-pass hack?
|
#25
|
EDIT 2018-04-12:
This hack of a method has been fixed and optimized, integrated into an auto-updating central plugin:
Source
Download Link
Spoiler
Made another "temp-fix". Invoked the glitch on myself and tried it. Below are some relevant lines that were the only thing that seemed to work.
Code:
if (!GetClientAuthId(client, AuthId_Steam2, auth, sizeof(auth)) || StrContains("STEAM_ID_STOP_IGNORING_RETVALS", auth, false) != -1) // Had to check for both
And attached is what I ended up with.
Code:
Spoiler
Code:
#pragma newdecls required
#pragma semicolon 1
#include <sourcemod>
#include <basecomm>
ConVar cvarDisableNonAuthedSpam;
Handle authClientTimer[MAXPLAYERS + 1];
public Plugin myinfo = {
name = "[TF2] Temp Auth Exploit 'Fix'",
author = "TheXeon",
description = "Small plugin to keep non-authed on spec.",
version = "0.0.2",
url = "https://www.neogenesisnetwork.net/"
}
public void OnPluginStart()
{
cvarDisableNonAuthedSpam = CreateConVar("sm_tempfix_disable_authspam", "1", "Should players be kicked if they don't auth?");
}
public void OnClientConnected(int client)
{
if (cvarDisableNonAuthedSpam.BoolValue && !IsFakeClient(client))
authClientTimer[client] = CreateTimer(2.0, AuthCheckTimer, GetClientUserId(client), TIMER_REPEAT);
}
public Action AuthCheckTimer(Handle timer, int userid)
{
int client = GetClientOfUserId(userid);
char auth[24];
if (!GetClientAuthId(client, AuthId_Steam2, auth, sizeof(auth)) || StrContains("STEAM_ID_STOP_IGNORING_RETVALS", auth, false) != -1)
{
if (IsPlayerAlive(client))
{
ChangeClientTeam(client, 1);
PrintToChat(client, "Your client has not been authed, please reconnect.");
}
BaseComm_SetClientGag(client, true);
BaseComm_SetClientMute(client, true);
ServerCommand("namelockid %d 1", userid);
}
else
return Plugin_Stop;
return Plugin_Continue;
}
public void OnClientDisconnect(int client)
{
if (authClientTimer[client] != null)
{
KillTimer(authClientTimer[client]);
authClientTimer[client] = null;
}
}
Last edited by TheXeon; 04-12-2018 at 05:14.
|
|
|
|