Diff
checker
Testo
Testo
Immagini
Documenti
Excel
Cartelle
Legal
Enterprise
Applicazione per desktop
Prezzi
Accedi
Scarica Diffchecker Desktop
Confronta il testo
Trova la differenza tra due file di testo
Strumenti
Cronologia
Editor live
Nascondi spazi bianchi
Comprimi invariate
Senza a capo
Layout
Diviso
Unificato
Livello di dettaglio
Intelligente
Parola
Carattere
Stili testo
Modifica aspetto
Evidenziazione sintassi
Scegli sintassi
Ignora
Trasforma testo
Vai alla prima modifica
Modifica input
Diffchecker Desktop
Il modo più sicuro per usare Diffchecker. Ottieni l'app Diffchecker Desktop: i tuoi diff non lasciano mai il tuo computer!
Ottieni Desktop
SBP Dhooks
Creato
7 anni fa
Il diff non scade mai
Eliminare
Esporta
Condividere
Spiegare
48 rimozioni
Linee
Totale
Rimosso
Caratteri
Totale
Rimosso
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
141 linee
Copia tutti
9 aggiunte
Linee
Totale
Aggiunto
Caratteri
Totale
Aggiunto
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
119 linee
Copia tutti
#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",
Copia
Copiato
Copia
Copiato
description = "
",
description = "
Block People From stealing your Plugins
",
author = "
Bara
",
author = "
[PewDiePie]
",
version = "1.0.0",
version = "1.0.0",
Copia
Copiato
Copia
Copiato
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;
}
}
Copia
Copiato
Copia
Copiato
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;
}
}
Diff salvati
Testo originale
Apri 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; }
Testo modificato
Apri 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; }
Trovare la differenza