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.
* 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 client, int attacker, int inflictor);
public Action CS_OnBlindPlayer(int client, int attacker, int 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.
GetEntProp(inflictor, Prop_Data, "m_iTeamNum");
GetEntPropVector(inflictor, Prop_Data, "m_vecAbsOrigin", origin);
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.