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

Solved [TF2][HELP] How to detect market garden


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
J0BL3SS
Senior Member
Join Date: Sep 2020
Location: Turkey/Istanbul
Old 04-01-2021 , 05:29   [TF2][HELP] How to detect market garden
Reply With Quote #1

Im trying to detect market garden via SDKHooks. The code I made works in a sketchy way, sometimes it can detect it, but sometimes even if it does not detect it at all, but its still counts a market garden.

Code:
public Action Hook_OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3], int damagecustom)
{
    if(IsValidClient(victim) && IsValidClient(attacker) && victim != attacker)
    {
    	
	if(GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex") == 416)
	{
		if(TF2_IsPlayerInCondition(attacker, TFCond_BlastJumping))
		{
			// its a market garden, do things
		}
		else if(damagetype & DMG_CRIT || damagetype == DMG_CRIT)
		{
			// its a market garden, do things
		}
	}
    }
    return Plugin_Continue;
}
__________________
My Steam Profile
My Discord Name: J0BL3SS#5320 | j0bl3ss

I don't really look at steam or alliedmodders, contact me from discord if you need it.

Last edited by J0BL3SS; 05-02-2021 at 04:09. Reason: solved
J0BL3SS 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 06:15.


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