Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
SBP Dhooks
作成日
7 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
48 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
141 行
すべてコピー
9 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
119 行
すべてコピー
#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",
コピー
コピー済み
コピー
コピー済み
description = "
",
description = "
Block People From stealing your Plugins
",
author = "
Bara
",
author = "
[PewDiePie]
",
version = "1.0.0",
version = "1.0.0",
コピー
コピー済み
コピー
コピー済み
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;
}
}
コピー
コピー済み
コピー
コピー済み
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;
}
}
保存された差分
原文
ファイルを開く
#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; }
変更されたテキスト
ファイルを開く
#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; }
違いを見つける