#pragma semicolon 1#include <sourcemod>#include <sdktools>#include <dhooks>#pragma newdecls requiredHandle g_hFireBullet;public void OnPluginStart(){ GameData conf = LoadGameConfigFile("firebullethook.games"); g_hFireBullet = DHookCreateFromConf(conf, "CCSPlayer::FireBullet"); if (g_hFireBullet == INVALID_HANDLE) SetFailState("Failed to setup detour for CCSPlayer::FireBullet"); delete conf; if (!DHookEnableDetour(g_hFireBullet, false, Detour_OnFireBullet)) SetFailState("Failed to detour CCSPlayer::FireBullet");}public MRESReturn Detour_OnFireBullet(int client, Handle params){ return MRES_Ignored;}
"Games" { "csgo" { "Functions" { "CCSPlayer::FireBullet" { "signature" "CCSPlayer::FireBullet" "callconv" "thiscall" "return" "void" "this" "entity" "arguments" { "origin" { "type" "object" "size" "12" } "angles" { "type" "vectorptr" } "distance" { "type" "float" "windows" { "register" "xmm3" } } "penetration_power" { "type" "float" } "penetration" { "type" "int" } "bullet_type" { "type" "int" } "damage" { "type" "int" } "unknown" { "type" "int" } "bullet" { "type" "int" "windows" { "register" "esi" } "linux" { "register" "ebx" } } "range_modifier" { "type" "float" } "attacker" { "type" "cbaseentity" } "do_effects" { "type" "bool" } "spread_x" { "type" "float" } "spread_y" { "type" "float" } } } } "Signatures" { "CCSPlayer::FireBullet" { "library" "server" "windows" "\x55\x8B\xEC\x83\xE4\xF0\x81\xEC\x2A\x2A\x2A\x2A\x66\x0F\x6E\x45\x2A\x8D\x94\x24\x2A\x2A\x2A\x2A" "linux" "\x55\x89\xE5\x57\x56\x53\x81\xEC\x2A\x2A\x2A\x2A\x0F\xB6\x45\x2A\xF3\x0F\x2A\x45\x2A\x88\x85\x2A\x2A\x2A\x2A\x8D\x85\x2A\x2A\x2A\x2A\x89\x44\x24\x2A\x8D\x85\x2A\x2A\x2A\x2A\x89\x44\x24\x2A\x8D\x85\x2A\x2A\x2A\x2A\x89\x44\x24\x2A\x8B\x45\x2A\xF3\x0F\x11\x45\x2A" } } } }