initial commit

This commit is contained in:
BotoX
2016-01-06 02:11:56 +01:00
commit 72f7665358
106 changed files with 17675 additions and 0 deletions
@@ -0,0 +1,15 @@
"Games"
{
"cstrike"
{
"Offsets"
{
"OnDamagedByExplosion"
{
"windows" "335"
"linux" "336"
"mac" "336"
}
}
}
}
@@ -0,0 +1,42 @@
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <dhooks>
//int CCSPlayer::OnDamagedByExplosion(CTakeDamageInfo const&)
Handle 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",
url = ""
};
public void OnPluginStart()
{
Handle hTemp = LoadGameConfigFile("NoGrenadeRinging.games");
if(hTemp == INVALID_HANDLE)
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);
}
public void OnClientPutInServer(int client)
{
//Dont add removal callback for this one
DHookEntity(g_hDamagedByExplosion, false, client);
}
//int CCSPlayer::OnDamagedByExplosion(CTakeDamageInfo const&)
public MRESReturn:OnDamagedByExplosion(int pThis, Handle hReturn, Handle hParams)
{
// Block call
return MRES_Supercede;
}
+1
View File
@@ -0,0 +1 @@
../../../includes/dhooks.inc