View Single Post
Austin
Senior Member
Join Date: Oct 2005
Old 10-11-2021 , 13:02   Re: [CSGO] I can’t block CSGO Events
Reply With Quote #4

Maxximou5
I was using the headshot example just because it was right from the SM docs. And not working as I expected.
I am right now only interested in blocking.
round_end
hostage_rescued
hostage_rescued_all

Thanks for the reply and example tho.
As a weird bit of info…
My #1 first ever plugin I wrote was to block humans from getting headshot from bots.
This was for condition zero in amx modx almost 20 years ago!

I since ported it to Sourcemod.
(I only reduce the headshot damage because the bots do weird things, or used to, if you totally remove it)
PHP Code:
public Action:HookTraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotypehitboxHitGroup)
{
    if (!
attacker || attacker MaxClients)
        return 
Plugin_Continue;

    
// If a bot is the attacker and human being attacked, reduce the damage!
    
if(IsFakeClient(attacker) && !IsFakeClient(victim))
    {
        
//  head shot
        
if(HitGroup == 1)
        {
            
damage damage 0.001;
            return 
Plugin_Changed;
        } 
Bacardi
Thanks for the info.

I need to do more research obviously.

With SDKhook_ we block the Functions and I was hoping with
Hook() we could block the entire event before it is fired and thus would block the function call too.

Looking at what we can hook there isn’t anything to support hostage rescued events.
Is this the complete up to date list of what can be hooked?
Also where can I get a list of all events that can be used with Hook()?
https://forums.alliedmods.net/showthread.php?t=106748

And thanks for this setting
mp_ignore_round_win_conditions
I didn’t know about it but it dramatically affects the game like removing the time / removes all hostages / etc.

Can you please give me just the outline of where to look and what I would need to do to have totally control over hostage_rescued and hostage_rescued_all?

Would it be DHooks or would I finally have to be forced to learn sigscanning?

I actually would like to have SDKBotHook_ and wondering why no one has added better bot support in SM.
Austin is offline