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

[L4D2] Detect when a survivor is Stumbling?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 04-04-2015 , 21:35   [L4D2] Detect when a survivor is Stumbling?
Reply With Quote #1

So, I tried doing a repetitive timer that loops through all clients, check to see if they where in the stumbling animation, and if so disable ledge hang.

However, I have come across the issue that every time the map is changed, the animation indexes have changed, and thus rendering the plugin invalid as the values are not the same.

Is there anyways to find out if/when a survivor is stumbling?

There are no related events that I can hook, and looking through the netprops I can't seem to find anything.

Anyone have any ideas?
__________________
DeathChaos25 is offline
midnight9
Senior Member
Join Date: Nov 2012
Old 04-06-2015 , 12:22   Re: [L4D2] Detect when a survivor is Stumbling?
Reply With Quote #2

There is a plugin that blocks all button presses during stumbles, you think this could help you?
midnight9 is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 04-06-2015 , 13:49   Re: [L4D2] Detect when a survivor is Stumbling?
Reply With Quote #3

Quote:
Originally Posted by midnight9 View Post
There is a plugin that blocks all button presses during stumbles, you think this could help you?
Yes!
If it blocks all button presses during stumble this would mean it is somehow checking for when a stumble happens, this check would be what I need.
__________________
DeathChaos25 is offline
midnight9
Senior Member
Join Date: Nov 2012
Old 04-06-2015 , 13:52   Re: [L4D2] Detect when a survivor is Stumbling?
Reply With Quote #4

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

#define GAMEDATA_FILE "staggersolver"

public Plugin:myinfo =
{
    
name "Super Stagger Solver",
    
author "CanadaRox",
    
description "Blocks all button presses during stumbles",
    
version "(^.^)",
};

new 
Handle:g_hGameConf;
new 
Handle:g_hIsStaggering;

public 
OnPluginStart()
{
    
g_hGameConf LoadGameConfigFile(GAMEDATA_FILE);
    if (
g_hGameConf == INVALID_HANDLE)
        
SetFailState("[Stagger Solver] Could not load game config file.");

    
StartPrepSDKCall(SDKCall_Player);

    if (!
PrepSDKCall_SetFromConf(g_hGameConfSDKConf_Signature"IsStaggering"))
        
SetFailState("[Stagger Solver] Could not find signature IsStaggering.");
    
PrepSDKCall_SetReturnInfo(SDKType_PlainOldDataSDKPass_Plain);
    
g_hIsStaggering EndPrepSDKCall();
    if (
g_hIsStaggering == INVALID_HANDLE)
        
SetFailState("[Stagger Solver] Failed to load signature IsStaggering");

    
CloseHandle(g_hGameConf);
}

public 
Action:OnPlayerRunCmd(client, &buttons)
{
    if (
IsClientInGame(client) && IsPlayerAlive(client) && SDKCall(g_hIsStaggeringclient))
    {
        
buttons 0;
    }
    return 
Plugin_Continue;


Last edited by midnight9; 04-06-2015 at 13:53.
midnight9 is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 04-06-2015 , 14:59   Re: [L4D2] Detect when a survivor is Stumbling?
Reply With Quote #5

You'll need the gamedata file: https://github.com/MatthewClair/sour...ggersolver.txt
Miu is offline
midnight9
Senior Member
Join Date: Nov 2012
Old 04-06-2015 , 15:03   Re: [L4D2] Detect when a survivor is Stumbling?
Reply With Quote #6

Ahh yes, sorry forgot to include this.
midnight9 is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 04-06-2015 , 15:18   Re: [L4D2] Detect when a survivor is Stumbling?
Reply With Quote #7

Is the Signature Up to date?

"Could not find signature IsStaggering"

Edit : Nvm, got it working somehow, thanks!
__________________

Last edited by DeathChaos25; 04-06-2015 at 15:37.
DeathChaos25 is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 04-06-2015 , 15:30   Re: [L4D2] Detect when a survivor is Stumbling?
Reply With Quote #8

The file seems to be two years old so maybe not
Miu 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 13:07.


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