Raised This Month: $51 Target: $400
 12% 

[CSGO] I can’t block CSGO Events


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Austin
Senior Member
Join Date: Oct 2005
Old 10-08-2021 , 19:51   [CSGO] I can’t block CSGO Events
Reply With Quote #1

According to these Sourcemod docs we can block events and they give this example to block headshots.
https://wiki.alliedmods.net/Events_(...Mod_Scripting)

I adding the logging line and built this for CSGO
and the “Blocking Headshot “ message is printed to the console when a player takes a headshot but it doesn’t block the headshots.

PHP Code:
public void OnPluginStart()
{
    
HookEvent("player_death"Event_PlayerDeathEventHookMode_Pre);
}
 
public 
Action Event_PlayerDeath(Event event, const char[] namebool dontBroadcast)
{
    if (
event.GetBool("headshot"))
    {
      
PrintToServer("Blocking Headshot");
      return 
Plugin_Handled;
    }
    return 
Plugin_Continue;

I am interested in blocking these events and tried blocking them the same way (both Pre and Post) and no events are ever blocked.

round_end
hostage_rescued
hostage_rescued_all

Is there something different we have to do for CSGO to block events?
Austin is offline
 



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 13:34.


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