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

[Solved]Friendlyfire Between Two Players


Post New Thread Reply   
 
Thread Tools Display Modes
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 03-10-2014 , 03:25   Re: Friendlyfire Between Two Players
Reply With Quote #11

Quote:
Originally Posted by Compidence View Post
His code does that already.
His code clearly does not. There is no sense in hooking TakeDamage in both pre and post when it can be done in pre only. The only thing I forgot to do was supercede.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
mapper07
Member
Join Date: Oct 2012
Location: NY
Old 03-10-2014 , 03:25   Re: Friendlyfire Between Two Players
Reply With Quote #12

Quote:
Originally Posted by Compidence View Post
The parameters can be called anything you want them to be called. The name itself doesn't change what they are. You can call the first parameter id or victim or idiot. The information passed to the first parameter would still be the same.

What his code does is allow friendlyfire, which your code already does, assuming you change the index back in damage post. But I think the problem was with your checks, not the friendlyfire code.
Right, thank you. It seems to be working perfectly using the way you provided.

Quote:
Originally Posted by ConnorMcLeod View Post
You should hook TraceAttack for weapons so more things are blocked (as blood) and TakeDamage for HE nades.

Is mp_friendlyfire 0 or 1 on your server ? (1 needs to block more things than, but you may need it).
You mean so it ignores bullet damage and grenade damage? How would I approach that?
And friendly fire is always set to 0 but there are certain times where it is turned on but only using EnableHamForward, pending the the multiple situations that call for it.

Last edited by mapper07; 03-10-2014 at 21:22. Reason: Typo
mapper07 is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 03-10-2014 , 17:07   Re: Friendlyfire Between Two Players
Reply With Quote #13

Quote:
Originally Posted by imindfreak View Post
They're part of the if, structured in a way where you can see all conditions in separate lines for ease of view.
They're used as "or" in a conditional statement.

~Example Removed~
Thanks brother!
__________________
Like my clean plugins and work?
Baws is offline
mapper07
Member
Join Date: Oct 2012
Location: NY
Old 03-10-2014 , 21:22   Re: Friendlyfire Between Two Players
Reply With Quote #14

The main problem has been solved thanks mainly to Hornet and Compidence. Also thanks to all other parties involved [Baws, ConnorMcLeod]
mapper07 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 12:46.


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