|
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
|
04-04-2021
, 18:38
Re: [TF2][HELP] How to detect market garden
|
#4
|
Quote:
Originally Posted by StrikeR14
I'd use:
PHP Code:
bool InMarketAir[MAXPLAYERS+1];
public void OnPluginStart()
{
HookEvent("rocket_jump", RocketJumped, EventHookMode_Pre);
HookEvent("rocket_jump_landed", RocketJumpLanded, EventHookMode_Post);
}
...
public Action RocketJumped(Handle event, const char[] name, bool dontBroadcast)
{
InMarketAir[GetClientOfUserId(GetEventInt(event, "userid"))] = true;
return Plugin_Continue;
}
public Action RocketJumpLanded(Handle event, const char[] name, bool dontBroadcast)
{
InMarketAir[GetClientOfUserId(GetEventInt(event, "userid"))] = false;
return Plugin_Continue;
}
On your SDK TakeDamage event, use if (InMarketAir[attacker]) with your m_iItemDefinitionIndex checks.
|
Not saying it won’t work, however, they already attempted to check if they were in the condition that is applied while rocket jumping.
|
|
|
|