[Solved]Friendlyfire Between Two Players
Alright so I realized my post had more information than needed. Basically, I am trying to allow friendly fire on between two players on the same team and only for those two players. I set a bit on one player as challenger and the other as challengee but I can't get it to work properly? I feel like I am making it harder than it really is.
PHP Code:
|
Re: Friendlyfire Between Two Players
question off topic ( maybe off topic? ) Whats with the || || || under if? Are they like goes with the if but like under it? Or it's another stuff? Me i understood they are part of the if. True?
|
Re: Friendlyfire Between Two Players
Change the attacking player's team, execute the damage, and then change him back.
|
Re: Friendlyfire Between Two Players
Quote:
They're used as "or" in a conditional statement. ~Example Removed~ |
Re: Friendlyfire Between Two Players
Quote:
|
Re: Friendlyfire Between Two Players
Code:
|
Re: Friendlyfire Between Two Players
Your code is missing a few things. Anyhow try this:
PHP Code:
Quote:
|
Re: Friendlyfire Between Two Players
Okay Hornets code threw me off because his Fwd_PlayerDamage had different parameters than the one I posted. I will try and test yours first Compidence then report back. Thank you.
|
Re: Friendlyfire Between Two Players
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. |
Re: Friendlyfire Between Two Players
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). |
All times are GMT -4. The time now is 14:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.