Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide whitespace changes
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Text styles
Change appearance
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
SBP Dhooks
Created
7 years ago
Diff never expires
Clear
Export
Share
Explain
48 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
141 lines
Copy
9 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
119 lines
Copy
#pragma semicolon 1
#pragma semicolon 1
#include <sourcemod>
#include <sourcemod>
#include <dhooks>
#include <dhooks>
#include <sdktools>
#include <sdktools>
#pragma newdecls required
#pragma newdecls required
Handle g_hClientPrintf = null;
Handle g_hClientPrintf = null;
char g_sLogs[PLATFORM_MAX_PATH + 1];
char g_sLogs[PLATFORM_MAX_PATH + 1];
public Plugin myinfo =
public Plugin myinfo =
{
{
name = "Hide Plugin List",
name = "Hide Plugin List",
Copy
Copied
Copy
Copied
description = "
",
description = "
Block People From stealing your Plugins
",
author = "
Bara
",
author = "
[PewDiePie]
",
version = "1.0.0",
version = "1.0.0",
Copy
Copied
Copy
Copied
url = "
https://github.com/Bara
"
url = "
"
};
};
public void OnPluginStart()
public void OnPluginStart()
{
{
Handle gameconf = LoadGameConfigFile("sbp.games");
Handle gameconf = LoadGameConfigFile("sbp.games");
if(gameconf == null)
if(gameconf == null)
{
{
SetFailState("Failed to find sbp.games.txt gamedata");
SetFailState("Failed to find sbp.games.txt gamedata");
delete gameconf;
delete gameconf;
}
}
int offset = GameConfGetOffset(gameconf, "ClientPrintf");
int offset = GameConfGetOffset(gameconf, "ClientPrintf");
if(offset == -1)
if(offset == -1)
{
{
SetFailState("Failed to find offset for ClientPrintf");
SetFailState("Failed to find offset for ClientPrintf");
delete gameconf;
delete gameconf;
}
}
StartPrepSDKCall(SDKCall_Static);
StartPrepSDKCall(SDKCall_Static);
if(!PrepSDKCall_SetFromConf(gameconf, SDKConf_Signature, "CreateInterface"))
if(!PrepSDKCall_SetFromConf(gameconf, SDKConf_Signature, "CreateInterface"))
{
{
SetFailState("Failed to get CreateInterface");
SetFailState("Failed to get CreateInterface");
delete gameconf;
delete gameconf;
}
}
PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);
PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);
PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Pointer, VDECODE_FLAG_ALLOWNULL);
PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Pointer, VDECODE_FLAG_ALLOWNULL);
PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain);
PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain);
char identifier[64];
char identifier[64];
if(!GameConfGetKeyValue(gameconf, "EngineInterface", identifier, sizeof(identifier)))
if(!GameConfGetKeyValue(gameconf, "EngineInterface", identifier, sizeof(identifier)))
{
{
SetFailState("Failed to get engine identifier name");
SetFailState("Failed to get engine identifier name");
delete gameconf;
delete gameconf;
}
}
Handle temp = EndPrepSDKCall();
Handle temp = EndPrepSDKCall();
Address addr = SDKCall(temp, identifier, 0);
Address addr = SDKCall(temp, identifier, 0);
delete gameconf;
delete gameconf;
delete temp;
delete temp;
if(!addr)
if(!addr)
{
{
SetFailState("Failed to get engine ptr");
SetFailState("Failed to get engine ptr");
}
}
g_hClientPrintf = DHookCreate(offset, HookType_Raw, ReturnType_Void, ThisPointer_Ignore, Hook_ClientPrintf);
g_hClientPrintf = DHookCreate(offset, HookType_Raw, ReturnType_Void, ThisPointer_Ignore, Hook_ClientPrintf);
DHookAddParam(g_hClientPrintf, HookParamType_Edict);
DHookAddParam(g_hClientPrintf, HookParamType_Edict);
DHookAddParam(g_hClientPrintf, HookParamType_CharPtr);
DHookAddParam(g_hClientPrintf, HookParamType_CharPtr);
DHookRaw(g_hClientPrintf, false, addr);
DHookRaw(g_hClientPrintf, false, addr);
char sDate[18];
char sDate[18];
FormatTime(sDate, sizeof(sDate), "%y-%m-%d");
FormatTime(sDate, sizeof(sDate), "%y-%m-%d");
BuildPath(Path_SM, g_sLogs, sizeof(g_sLogs), "logs/sbp-%s.log", sDate);
BuildPath(Path_SM, g_sLogs, sizeof(g_sLogs), "logs/sbp-%s.log", sDate);
}
}
public MRESReturn Hook_ClientPrintf(Handle hParams)
public MRESReturn Hook_ClientPrintf(Handle hParams)
{
{
char sBuffer[1024];
char sBuffer[1024];
int client = DHookGetParam(hParams, 1);
int client = DHookGetParam(hParams, 1);
if (client == 0)
if (client == 0)
{
{
return MRES_Ignored;
return MRES_Ignored;
}
}
DHookGetParamString(hParams, 2, sBuffer, sizeof(sBuffer));
DHookGetParamString(hParams, 2, sBuffer, sizeof(sBuffer));
if(sBuffer[1] == '"' && (StrContains(sBuffer, "\" (") != -1 || (StrContains(sBuffer, ".smx\" ") != -1)))
if(sBuffer[1] == '"' && (StrContains(sBuffer, "\" (") != -1 || (StrContains(sBuffer, ".smx\" ") != -1)))
{
{
DHookSetParamString(hParams, 2, "");
DHookSetParamString(hParams, 2, "");
return MRES_ChangedHandled;
return MRES_ChangedHandled;
}
}
else if(StrContains(sBuffer, "To see more, type \"sm plugins") != -1)
else if(StrContains(sBuffer, "To see more, type \"sm plugins") != -1)
{
{
if (client > 0 && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client))
if (client > 0 && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client))
{
{
if (CheckCommandAccess(client, "sm_admin", ADMFLAG_ROOT, true))
if (CheckCommandAccess(client, "sm_admin", ADMFLAG_ROOT, true))
{
{
return MRES_Ignored;
return MRES_Ignored;
}
}
Copy
Copied
Copy
Copied
PrintToConsole(client, " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
PrintToConsole(
iC
lient, "
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶GET LOST YOU STEALER¶¶¶¶¶¶¶¶¶
¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶
¶¶¶¶¶¶¶
¶¶¶¶¶¶¶DONT STEAL MY
¶¶¶¶
¶¶¶¶¶
¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶
¶¶¶
¶¶¶¶
¶¶¶
¶¶¶¶
PLUGINS
¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶¶¶¶
¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶");
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶CODED BY PEWDIEPIE¶¶¶¶¶¶¶¶¶¶¶");
PrintToConsole(
c
lient, "
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
______
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶¶____¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
______¶¶______¶¶______
¶¶¶¶¶¶¶¶¶¶¶¶¶
\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶
¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶");
PrintToConsole(client, " ¶¶¶__¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶______¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶
¶¶¶\n \
¶¶______¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶¶
______
¶¶¶¶¶¶¶
_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶¶¶
______
¶¶¶¶¶
______¶¶______¶¶______¶¶______
¶¶¶¶¶\n \
¶¶¶¶¶_______¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \
¶¶¶¶¶¶
_______
¶¶¶
_____¶¶______¶¶______
¶¶¶
___
¶¶¶¶
¶¶¶");
PrintToConsole(client, "
¶¶¶¶¶¶¶¶
______¶¶¶¶_¶¶¶¶______¶¶¶¶__¶¶¶¶¶¶
¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶___¶¶¶¶¶¶¶¶¶¶¶_____¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶
________
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶
________¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶
__________¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶
¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_________________________¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__________________¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \
¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n ");
PrintToConsole(client, "\t\tNo chance\n");
PrintToConsole(client, "\t\tNo chance\n");
LogToFile(g_sLogs, "\"%L\" tried to get the plugin list", client);
LogToFile(g_sLogs, "\"%L\" tried to get the plugin list", client);
}
}
return MRES_ChangedHandled;
return MRES_ChangedHandled;
}
}
return MRES_Ignored;
return MRES_Ignored;
}
}
Saved diffs
Original text
Open file
#pragma semicolon 1 #include <sourcemod> #include <dhooks> #include <sdktools> #pragma newdecls required Handle g_hClientPrintf = null; char g_sLogs[PLATFORM_MAX_PATH + 1]; public Plugin myinfo = { name = "Hide Plugin List", description = "", author = "Bara", version = "1.0.0", url = "https://github.com/Bara" }; public void OnPluginStart() { Handle gameconf = LoadGameConfigFile("sbp.games"); if(gameconf == null) { SetFailState("Failed to find sbp.games.txt gamedata"); delete gameconf; } int offset = GameConfGetOffset(gameconf, "ClientPrintf"); if(offset == -1) { SetFailState("Failed to find offset for ClientPrintf"); delete gameconf; } StartPrepSDKCall(SDKCall_Static); if(!PrepSDKCall_SetFromConf(gameconf, SDKConf_Signature, "CreateInterface")) { SetFailState("Failed to get CreateInterface"); delete gameconf; } PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer); PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Pointer, VDECODE_FLAG_ALLOWNULL); PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain); char identifier[64]; if(!GameConfGetKeyValue(gameconf, "EngineInterface", identifier, sizeof(identifier))) { SetFailState("Failed to get engine identifier name"); delete gameconf; } Handle temp = EndPrepSDKCall(); Address addr = SDKCall(temp, identifier, 0); delete gameconf; delete temp; if(!addr) { SetFailState("Failed to get engine ptr"); } g_hClientPrintf = DHookCreate(offset, HookType_Raw, ReturnType_Void, ThisPointer_Ignore, Hook_ClientPrintf); DHookAddParam(g_hClientPrintf, HookParamType_Edict); DHookAddParam(g_hClientPrintf, HookParamType_CharPtr); DHookRaw(g_hClientPrintf, false, addr); char sDate[18]; FormatTime(sDate, sizeof(sDate), "%y-%m-%d"); BuildPath(Path_SM, g_sLogs, sizeof(g_sLogs), "logs/sbp-%s.log", sDate); } public MRESReturn Hook_ClientPrintf(Handle hParams) { char sBuffer[1024]; int client = DHookGetParam(hParams, 1); if (client == 0) { return MRES_Ignored; } DHookGetParamString(hParams, 2, sBuffer, sizeof(sBuffer)); if(sBuffer[1] == '"' && (StrContains(sBuffer, "\" (") != -1 || (StrContains(sBuffer, ".smx\" ") != -1))) { DHookSetParamString(hParams, 2, ""); return MRES_ChangedHandled; } else if(StrContains(sBuffer, "To see more, type \"sm plugins") != -1) { if (client > 0 && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client)) { if (CheckCommandAccess(client, "sm_admin", ADMFLAG_ROOT, true)) { return MRES_Ignored; } PrintToConsole(client, " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶"); PrintToConsole(client, " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶¶____¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶"); PrintToConsole(client, " ¶¶¶__¶¶¶¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶______¶¶¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶______¶¶¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶______¶¶¶¶¶¶¶_____¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶______¶¶¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶_______¶¶¶______¶¶______¶¶______¶¶______¶¶¶¶¶\n \ ¶¶¶¶¶¶_______¶¶¶_____¶¶______¶¶______¶¶¶___¶¶¶¶¶¶¶"); PrintToConsole(client, " ¶¶¶¶¶¶¶¶______¶¶¶¶_¶¶¶¶______¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶______¶¶¶¶¶¶¶¶¶¶___¶¶¶¶¶¶¶¶¶¶¶_____¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶________¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶¶¶__________¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_________________________¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶__________________¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n "); PrintToConsole(client, "\t\tNo chance\n"); LogToFile(g_sLogs, "\"%L\" tried to get the plugin list", client); } return MRES_ChangedHandled; } return MRES_Ignored; }
Changed text
Open file
#pragma semicolon 1 #include <sourcemod> #include <dhooks> #include <sdktools> #pragma newdecls required Handle g_hClientPrintf = null; char g_sLogs[PLATFORM_MAX_PATH + 1]; public Plugin myinfo = { name = "Hide Plugin List", description = "Block People From stealing your Plugins", author = "[PewDiePie]", version = "1.0.0", url = "" }; public void OnPluginStart() { Handle gameconf = LoadGameConfigFile("sbp.games"); if(gameconf == null) { SetFailState("Failed to find sbp.games.txt gamedata"); delete gameconf; } int offset = GameConfGetOffset(gameconf, "ClientPrintf"); if(offset == -1) { SetFailState("Failed to find offset for ClientPrintf"); delete gameconf; } StartPrepSDKCall(SDKCall_Static); if(!PrepSDKCall_SetFromConf(gameconf, SDKConf_Signature, "CreateInterface")) { SetFailState("Failed to get CreateInterface"); delete gameconf; } PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer); PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Pointer, VDECODE_FLAG_ALLOWNULL); PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain); char identifier[64]; if(!GameConfGetKeyValue(gameconf, "EngineInterface", identifier, sizeof(identifier))) { SetFailState("Failed to get engine identifier name"); delete gameconf; } Handle temp = EndPrepSDKCall(); Address addr = SDKCall(temp, identifier, 0); delete gameconf; delete temp; if(!addr) { SetFailState("Failed to get engine ptr"); } g_hClientPrintf = DHookCreate(offset, HookType_Raw, ReturnType_Void, ThisPointer_Ignore, Hook_ClientPrintf); DHookAddParam(g_hClientPrintf, HookParamType_Edict); DHookAddParam(g_hClientPrintf, HookParamType_CharPtr); DHookRaw(g_hClientPrintf, false, addr); char sDate[18]; FormatTime(sDate, sizeof(sDate), "%y-%m-%d"); BuildPath(Path_SM, g_sLogs, sizeof(g_sLogs), "logs/sbp-%s.log", sDate); } public MRESReturn Hook_ClientPrintf(Handle hParams) { char sBuffer[1024]; int client = DHookGetParam(hParams, 1); if (client == 0) { return MRES_Ignored; } DHookGetParamString(hParams, 2, sBuffer, sizeof(sBuffer)); if(sBuffer[1] == '"' && (StrContains(sBuffer, "\" (") != -1 || (StrContains(sBuffer, ".smx\" ") != -1))) { DHookSetParamString(hParams, 2, ""); return MRES_ChangedHandled; } else if(StrContains(sBuffer, "To see more, type \"sm plugins") != -1) { if (client > 0 && IsClientInGame(client) && !IsFakeClient(client) && !IsClientSourceTV(client)) { if (CheckCommandAccess(client, "sm_admin", ADMFLAG_ROOT, true)) { return MRES_Ignored; } PrintToConsole(iClient, " ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶GET LOST YOU STEALER¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶DONT STEAL MY¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶PLUGINS¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶\n \ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶CODED BY PEWDIEPIE¶¶¶¶¶¶¶¶¶¶¶"); PrintToConsole(client, "\t\tNo chance\n"); LogToFile(g_sLogs, "\"%L\" tried to get the plugin list", client); } return MRES_ChangedHandled; } return MRES_Ignored; }
Find difference