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

help with func_physbox(ball)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xNos
SourceMod Donor
Join Date: Dec 2012
Location: Israel
Old 07-29-2013 , 07:28   help with func_physbox(ball)
Reply With Quote #1

hay guys I need help with func_physbox(ball) I wanna "save" the last attacker.
xNos is offline
Send a message via Skype™ to xNos
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 07-29-2013 , 12:06   Re: help with func_physbox(ball)
Reply With Quote #2

As this? https://forums.alliedmods.net/showthread.php?p=1294971
__________________
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
Eden.Campo
Member
Join Date: Mar 2013
Old 07-29-2013 , 12:53   Re: help with func_physbox(ball)
Reply With Quote #3

Code:
new LastAttacker;

public OnEntityCreated(edict, const String:classname[])
{
	if(IsValidEdict(edict) && IsValidEntity(edict))
	{
		if(StrEqual(classname, "func_physbox"))
		{
			SDKHook(edict, SDKHook_OnTakeDamage, OnEntityTakeDamage);
		}
	}
}

public Action:OnEntityTakeDamage(edict, &inflictor, &attacker, &Float:damage, &damagetype)
{
	if(IsValidEdict(edict) && IsValidEntity(edict))
	{
		LastAttacker = attacker;
	}
	
	return Plugin_Continue;
}

Last edited by Eden.Campo; 07-29-2013 at 12:53.
Eden.Campo is offline
xNos
SourceMod Donor
Join Date: Dec 2012
Location: Israel
Old 07-29-2013 , 17:15   Re: help with func_physbox(ball)
Reply With Quote #4

tnx
xNos is offline
Send a message via Skype™ to xNos
Reply


Thread Tools
Display Modes

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 11:16.


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