just updating plugins to 64bit support

This commit is contained in:
jenz
2026-11-22 22:12:20 +01:00
parent 7a4f26c2bd
commit 2dca39be8a
32 changed files with 2990 additions and 516 deletions
@@ -6,9 +6,23 @@
{
"OnDamagedByExplosion"
{
"windows" "341"
"linux" "342"
"windows" "342"
"linux" "343"
"linux64" "343"
"mac" "343"
}
}
}
}
"csgo"
{
"Offsets"
{
"OnDamagedByExplosion"
{
"windows" "376"
"linux" "377"
"mac" "377"
}
}
}
}
+12 -11
View File
@@ -1,30 +1,31 @@
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>
#include <sdktools>
#include <dhooks>
// int CCSPlayer::OnDamagedByExplosion(CTakeDamageInfo const&)
Handle g_hDamagedByExplosion;
DynamicHook g_hDamagedByExplosion;
public Plugin myinfo =
{
name = "NoGrenadeRinging",
author = "BotoX",
description = "Block the annoying ringing noise when a grenade explodes next to you",
version = "1.0.1",
version = "1.2.2",
url = ""
};
public void OnPluginStart()
{
Handle hTemp = LoadGameConfigFile("NoGrenadeRinging.games");
if(hTemp == INVALID_HANDLE)
GameData hTemp = new GameData("NoGrenadeRinging.games");
if(hTemp == null)
SetFailState("Why you no has gamedata?");
int Offset = GameConfGetOffset(hTemp, "OnDamagedByExplosion");
g_hDamagedByExplosion = DHookCreate(Offset, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity, OnDamagedByExplosion);
DHookAddParam(g_hDamagedByExplosion, HookParamType_ObjectPtr);
CloseHandle(hTemp);
int Offset = hTemp.GetOffset("OnDamagedByExplosion");
g_hDamagedByExplosion = new DynamicHook(Offset, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity);
g_hDamagedByExplosion.AddParam(HookParamType_ObjectPtr);
delete hTemp;
/* Late load */
for(int client = 1; client <= MaxClients; client++)
@@ -37,13 +38,13 @@ public void OnPluginStart()
public void OnClientPutInServer(int client)
{
// Don't add removal callback for this one
DHookEntity(g_hDamagedByExplosion, false, client);
g_hDamagedByExplosion.HookEntity(Hook_Pre, client, OnDamagedByExplosion);
}
// int CCSPlayer::OnDamagedByExplosion(CTakeDamageInfo const&)
public MRESReturn OnDamagedByExplosion(int pThis, Handle hReturn, Handle hParams)
public MRESReturn OnDamagedByExplosion(int pThis, DHookReturn hReturn, DHookParam hParams)
{
// Block call
DHookSetReturn(hReturn, 0);
hReturn.Value = 0;
return MRES_Supercede;
}