Raised This Month: $ Target: $400
 0% 

[L4D/L4D2] Left 4 Dead (2) Include File (Last Updated: 04/21/2019)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 08-03-2019 , 16:32   Re: [L4D/L4D2] Left 4 Dead (2) Include File (Last Updated: 04/21/2019)
Reply With Quote #4

Quote:
Originally Posted by Dragokas View Post
Thank you!

Can you please describe more, what does that mean?

PHP Code:
/**
 * Checks if the survivor is capped.
 *
 * @param client    Players index.
 * @return            True if the player is capped, false otherwise.
 */
stock bool L4D_IsPlayerCapped(int client)
{
    
int survivorProps[4] = { 13284160081612815976 };
    
    for (
int i 0sizeof(survivorProps); i++)
    {
        if (
IsClientInGame(GetEntDataEnt2(survivorsurvivorProps[i])))
            return 
true;
    }
    
    return 
false;

It reads if they are being dominated by specials e.g. smoked charged jockeyed and pounded.

You should just get the offsets and cache them in a static when called because the offsets could change altho it would be very rare for l4d but still a better habbit or just use GetEntPropEnt as that uses a hashmap iirc.

How I do it much more understanding.
https://github.com/LuxLuma/Luxs-Mode...t.sp#L158-L165


The carry attacker is not included in his bool i think it should.
PHP Code:
stock bool L4D_IsPlayerCapped(int client)
{
    if(
GetEntPropEnt(clientProp_Send"m_pummelAttacker") > 0)
        return 
true;
    if(
GetEntPropEnt(clientProp_Send"m_carryAttacker") > 0)
        return 
true;
    if(
GetEntPropEnt(clientProp_Send"m_pounceAttacker") > 0)
        return 
true;
    if(
GetEntPropEnt(clientProp_Send"m_jockeyAttacker") > 0)
        return 
true;
    if(
GetEntPropEnt(clientProp_Send"m_tongueOwner") > 0)
        return 
true;
    
    return 
false;

less jnz's?
PHP Code:
stock bool L4D_IsPlayerCapped(int client)
{
    if(
GetEntPropEnt(clientProp_Send"m_pummelAttacker") > || 
        
GetEntPropEnt(clientProp_Send"m_carryAttacker") > || 
        
GetEntPropEnt(clientProp_Send"m_pounceAttacker") > || 
        
GetEntPropEnt(clientProp_Send"m_jockeyAttacker") > || 
        
GetEntPropEnt(clientProp_Send"m_pounceAttacker") > ||
        
GetEntPropEnt(clientProp_Send"m_tongueOwner") > 0)
        return 
true;
    return 
false;

__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D

Last edited by Lux; 08-03-2019 at 16:33.
Lux 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 23:28.


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