View Single Post
StrikeR14
AlliedModders Donor
Join Date: Apr 2016
Location: Behind my PC
Old 04-04-2021 , 15:59   Re: [TF2][HELP] How to detect market garden
Reply With Quote #3

I'd use:

PHP Code:
bool InMarketAir[MAXPLAYERS+1];

public 
void OnPluginStart()
{
      
HookEvent("rocket_jump"RocketJumpedEventHookMode_Pre);
      
HookEvent("rocket_jump_landed"RocketJumpLandedEventHookMode_Post);
}

...

public 
Action RocketJumped(Handle event, const char[] namebool dontBroadcast)
{
    
InMarketAir[GetClientOfUserId(GetEventInt(event"userid"))] = true;
    return 
Plugin_Continue;
}

public 
Action RocketJumpLanded(Handle event, const char[] namebool dontBroadcast)
{
    
InMarketAir[GetClientOfUserId(GetEventInt(event"userid"))] = false;
    return 
Plugin_Continue;


On your SDK TakeDamage event, use if (InMarketAir[attacker]) with your m_iItemDefinitionIndex checks.
__________________
Currently taking TF2/CSGO paid private requests!

My Plugins | My Discord Account

Last edited by StrikeR14; 04-04-2021 at 16:00.
StrikeR14 is offline