Raised This Month: $ Target: $400
 0% 

Zombie & Human Friendly Fire.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-08-2009 , 00:45   Zombie & Human Friendly Fire.
Reply With Quote #1

Is it possible to make friendly fire in zombie plague ?? cos i saw some server which had it.

the command "mp_friendlyfire 1" was block in zombie plague.

I search some codes in the source file.

PHP Code:
// Prevent friendly fire
 
if (g_zombie[attacker] == g_zombie[victim])
  return 
HAM_SUPERCEDE
I try to delete it. it work but, didn't work very well.

I wanted to make zombie can hit other zombie without infecting them. but when i delete the codes it infect them instead of hitting.

I can't seem to make friendly fire on humans. Can someone help me ??

I want to make friendly fire on both human, zombies.
Mr.Noobie is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 08-08-2009 , 07:01   Re: Zombie & Human Friendly Fire.
Reply With Quote #2

I made this fast up, but it's worth testing, just replace:
PHP Code:
// Prevent friendly fire
if (g_zombie[attacker] == g_zombie[victim])
     return 
HAM_SUPERCEDE
With:
PHP Code:
// Friendly fire
 
if( !g_zombieattacker ] )
{
     if( !
g_zombievictim ] )
     {
          if ( !
g_nemesis[victim])
          {
               
damage *= get_pcvar_floatcvar_zombiearmor );
               
SetHamParamFloat4damage );
          }
          return 
HAM_IGNORED;
     }
}
else if( 
g_zombievictim ] )
{
     if ( 
damage_type DMG_HEGRENADE )
          return 
HAM_SUPERCEDE;
     if ( 
g_nemesisattacker ] && inflictor == attacker )
          
SetHamParamFloat(4get_pcvar_floatcvar_nemdamage ) );
     return 
HAM_IGNORED;

SnoW is offline
Send a message via MSN to SnoW
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-08-2009 , 07:32   Re: Zombie & Human Friendly Fire.
Reply With Quote #3

Quote:
Originally Posted by SnoW View Post
I made this fast up, but it's worth testing, just replace:
PHP Code:
// Prevent friendly fire
if (g_zombie[attacker] == g_zombie[victim])
     return 
HAM_SUPERCEDE
With:
PHP Code:
// Friendly fire
 
if( !g_zombieattacker ] )
{
     if( !
g_zombievictim ] )
     {
          if ( !
g_nemesis[victim])
          {
               
damage *= get_pcvar_floatcvar_zombiearmor );
               
SetHamParamFloat4damage );
          }
          return 
HAM_IGNORED;
     }
}
else if( 
g_zombievictim ] )
{
     if ( 
damage_type DMG_HEGRENADE )
          return 
HAM_SUPERCEDE;
     if ( 
g_nemesisattacker ] && inflictor == attacker )
          
SetHamParamFloat(4get_pcvar_floatcvar_nemdamage ) );
     return 
HAM_IGNORED;


undefined symbol "inflictor"
Mr.Noobie is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 08-08-2009 , 08:06   Re: Zombie & Human Friendly Fire.
Reply With Quote #4

Weird, with my plugin it compiles fine. What version are you using?
Go to line 2306, which is following:
PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type
If you've the 2nd parameter something else than "inflictor", replace the word in the code I gave you to that.
SnoW is offline
Send a message via MSN to SnoW
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-08-2009 , 08:42   Re: Zombie & Human Friendly Fire.
Reply With Quote #5

Quote:
Originally Posted by SnoW View Post
Weird, with my plugin it compiles fine. What version are you using?
Go to line 2306, which is following:
PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type
If you've the 2nd parameter something else than "inflictor", replace the word in the code I gave you to that.
Sorry my mistake, because i change this part also.

PHP Code:
public fw_TraceAttack(victimattackerFloat:damageFloat:direction[3], tracehandledamage_type)

Still can't friendly fire. even i try to change this mp_friendlyfire 0 to mp_friendlyfire 1

Last edited by Mr.Noobie; 08-08-2009 at 08:48.
Mr.Noobie is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-12-2009 , 03:36   Re: Zombie & Human Friendly Fire.
Reply With Quote #6

Please help.
Mr.Noobie 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 17:41.


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