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

Solved 【L4D2】How to detect is survivor doing the "shove" process ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
little_froy
Senior Member
Join Date: May 2021
Old 04-23-2022 , 02:39   【L4D2】How to detect is survivor doing the "shove" process ?
Reply With Quote #1

#2 and cvar z_gun_swing_interval may help

Last edited by little_froy; 04-23-2022 at 08:05.
little_froy is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-23-2022 , 04:19   Re: 【L4D2】How to detect is survivor playing the "shove" animation ?
Reply With Quote #2

There are game events when player shoved something.

Everytime when player shove, it play sound.
PHP Code:
#include <sdktools>

public void OnPluginStart()
{
    
AddNormalSoundHook(soundhook);
}

public 
Action soundhook(int clients[MAXPLAYERS], int &numClientschar sample[PLATFORM_MAX_PATH],
      
int &entityint &channelfloat &volumeint &levelint &pitchint &flags,
      
char soundEntry[PLATFORM_MAX_PATH], int &seed)
{
    if(
entity && entity <= MaxClients
        
&& StrContains(sample")player/survivor/swing/"false) == 0)
    {
        
PrintToServer("Player %N shoved"entity);
    }

__________________
Do not Private Message @me
Bacardi is offline
Reply



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 15:38.


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