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

hooking buy zone


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
brhvitor6
Member
Join Date: Oct 2012
Old 12-02-2012 , 10:10   hooking buy zone
Reply With Quote #1

How can i see if a player is on a buy zone?
brhvitor6 is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 12-02-2012 , 10:16   Re: hooking buy zone
Reply With Quote #2

PHP Code:
GetEntProp(clientProp_Send"m_bInBuyZone") == 
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Mitchell
~lick~
Join Date: Mar 2010
Old 12-02-2012 , 12:21   Re: hooking buy zone
Reply With Quote #3

Quote:
Originally Posted by Franc1sco View Post
PHP Code:
GetEntProp(clientProp_Send"m_bInBuyZone") == 
YOu would need to compare it to 1, if it returns 1 or 0 it's like returning true/false.
Mitchell is offline
brhvitor6
Member
Join Date: Oct 2012
Old 12-02-2012 , 20:50   Re: hooking buy zone
Reply With Quote #4

thx alot... do you guys know how to block a shot?
brhvitor6 is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-02-2012 , 21:14   Re: hooking buy zone
Reply With Quote #5

Code:
public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
{
	for(new i = 1; i <= MaxClients; i++)
	{
		if(IsClientInGame(i))
			SDKHook(i, SDKHook_OnTakeDamage, OnTakeDamage);
	}
	return APLRes_Success;
}

public OnClientPutInServer(client)
{
	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}

public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3])
{
	if(damagetype & DMG_BULLET == 0 || attacker < 1 || attacker > MaxClients || !IsClientInGame(attacker) || !IsClientInGame(victim))
		return Plugin_Continue;
	else // Put stop damage conditions here
	{
		damage = 0.0;
		return Plugin_Changed;
	}
}
__________________

Last edited by Sheepdude; 12-02-2012 at 21:21.
Sheepdude 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 09:11.


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