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

Solved Playbackrate of animations


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 11-06-2015 , 18:10   Playbackrate of animations
Reply With Quote #1

I'm trying to make the charger's playback animation playback rate go really fast in left 4 dead 2

Solution
PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>

#define CHARGER_POUND_INCAP_MULTIPLYER 12.0
#define POUND_RATE 2.0

//cvar z_charger_pound_dmg
//change the cvar to the damage you want per pound

//meme name :)
public Plugin:myinfo 
{
    
name "Pounding machine",
    
author "Lux",
    
description "-",
    
version "ASSPOUNDER V9000",
    
url "-"
}



public 
OnClientPutInServer(iClient)
{
    
SDKHook(iClientSDKHook_PostThinkPostHook_OnPostThinkPost);
    
SDKHook(iClientSDKHook_OnTakeDamageeOnTakeDamage);
}
public 
OnClientDisconnect(iClient)
{
    
SDKUnhook(iClientSDKHook_PostThinkPostHook_OnPostThinkPost);
    
SDKUnhook(iClientSDKHook_OnTakeDamageeOnTakeDamage);
}

public 
Hook_OnPostThinkPost(iClient)
{
    if(!
IsPlayerAlive(iClient)) 
        return;
    
    new 
iTeam GetClientTeam(iClient);
    
    if(
iTeam || GetEntProp(iClientProp_Send"m_zombieClass") != 6)
        return;
    
    if(
GetEntPropEnt(iClientProp_Send"m_pummelVictim") > 0)
        
SetEntPropFloat(iClientProp_Send"m_flPlaybackRate"POUND_RATE);
}

public 
Action:eOnTakeDamage(iVictim, &iAttacker, &iInflictor, &Float:fDamage, &iDamagetype)
{
    if(
iAttacker || iAttacker MaxClients || !IsClientInGame(iAttacker) || GetClientTeam(iAttacker) != || GetEntProp(iAttackerProp_Send"m_zombieClass") != 6)
    return 
Plugin_Continue;
    
    if(
iVictim || iVictim MaxClients || !IsClientInGame(iVictim) || GetClientTeam(iVictim) != || !IsPlayerAlive(iVictim))
        return 
Plugin_Continue;
    
    if(
GetEntPropEnt(iVictimProp_Send"m_pummelAttacker") < 1)
        return 
Plugin_Continue;
    
    if(
GetEntProp(iVictimProp_Send"m_isIncapacitated"1) < 1)
        return 
Plugin_Continue;
    
    
fDamage fDamage CHARGER_POUND_INCAP_MULTIPLYER;
    return 
Plugin_Changed;

Few years later enjoy!

Last edited by Lux; 11-29-2021 at 08:16.
Lux is offline
SoulSharD
Member
Join Date: Oct 2013
Location: United Kingdom
Old 11-07-2015 , 09:32   Re: Playbackrate of animations
Reply With Quote #2

Not certain if this'll work, but perhaps try this instead.

PHP Code:
SetVariantFloat(2.0); // Double animation speed.
AcceptEntityInput(iPvm"SetPlaybackRate"); 
__________________

SoulSharD is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 11-08-2015 , 07:56   Re: Playbackrate of animations
Reply With Quote #3

Nope it did not :c i'm still new to all this and i'v not saw anyone do this besides with the gunreload animation, so bit in the dark for char animation speed
Lux 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 11:20.


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