Raised This Month: $25 Target: $400

[CSGO] Blind Hook

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 02-11-2019 , 07:24   [CSGO] Blind Hook
Reply With Quote #1

Extension adds forward for flashbang's blind control.
Only for Counter-Strike: Global Offensive.

[email protected]/sm-blindhook * Releases page

Just drop archive content to 'csgo' folder.

[email protected]/sm-blindhook

PHP Code:
 * Called when a flashbang grenade perform player blinding.
 * Return Plugin_Continue to ignore or return a higher
 * action to protect player from blinding.
 * @param client        Client index which must be blinded
 * @param attacker        Entity index of the grenade thrower or -1 if not available
 * @param inflictor        Entity index of the grenade projectile
forward Action CS_OnBlindPlayer(int clientint attackerint inflictor); 
PHP Code:
#include <blindhook>

public Action CS_OnBlindPlayer(int clientint attackerint inflictor)
// Don't blind yourself
if (attacker == client)


Attacker index may be -1 if player left game before grenade was detonate.
Client and Inflictor always valid entity ids.
If you want to get team of thrower or detonate coordinates, do it by inflictor.
PHP Code:
Error: "Unable to read blindhook.games.txt"
Probably blindhook.games.txt is missing. Reupload latest extension version on server.

Error: "Failed to lookup RadiusFlash signature."
Try previous solution. If error still thrown, this means signature not correct for latest CS:GO version.
Wait for extension update. Track it at [email protected]/sm-blindhook * Wiki page.

Another problems of extension may cause (and probably will be) server crash.
How to check? This can happen only at flashbang detonate moment.
If crash happen at another moment, Blind Hook not cause of it.

How works? Stability
[email protected]/SourceEngine2007 * flashbang_projectile.cpp#L150
Extension set inline hook at RadiusFlash function loop. Fetch data from RadiusFlash variables to Handler function and call it.
If Handler return true, jump back to loop begin, otherwise jump back to hook point using trampoline method.
Read more how inline hooking and trampoline works here: MalwareTech
- Inline Hooking for Programmers (Part 1: Introduction)

How stable this? - not good
RadiusFlash big function that contain more 10 inline functions. Change any of it will cause offsets or signature change.
But i can sure you, i will maintain this ASAP for keep this at condition.
Kailo is offline
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 02-11-2019 , 12:46   Re: [CSGO] Blind Hook
Reply With Quote #2

good job
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
Senior Member
Join Date: Sep 2017
Location: Czech republic
Old 02-11-2019 , 12:58   Re: [CSGO] Blind Hook
Reply With Quote #3

Awesome ^^ gj
My Github & Sourcemod work.
If you like my work and if you want to support me, you can through PayPal.
Javierko is offline
AlliedModders Donor
Join Date: Feb 2015
Old 02-12-2019 , 10:09   Re: [CSGO] Blind Hook
Reply With Quote #4

Thank you so much for this!
ImACow is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 04:54.

Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode