AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CSS] HardCoreFriendlyFire (https://forums.alliedmods.net/showthread.php?t=202888)

javalia 12-11-2012 18:39

[CSS] HardCoreFriendlyFire
 
2 Attachment(s)
<HardCoreFriendlyFire>



Introdution
there is few plugins that r changing friendly fire damage or changing game into FFA.
but, this plugin has few different points in it`s code.
this plugin changes player`s team when they r attacked by teammates,
so damage will correctly calculated by game.
not like other FF damage change plugins that r just simply changing damage to teammates by multiplying some values to damage.
so u can expect this plugin will work better with other plugin/maps that r making players deal dmg to teammates.

however, this plugin can make side effect to plugins that r having code related to OnTakeDamage function and player_death and player_hurt event.

and, if u want to hide friendly fire warning msg in chat area, i recommand this plugin to be used together. https://forums.alliedmods.net/showth...19#post1852319

this plugin has bug related with round end msg of css. because game actually thinks u attacked enemy, not your teammate. but its not a critical thing...



Requirements

this plugin needs the things listed below to work:
  • SDKHooks



Installation

to install this plugin
  • put the smx file in the sourcemod/plugins folder
to compile this plugin manually
  • put sp file in the sourcemod/scripting folder
  • compile.



Configuration

cvarlist for this version
Code:

// This file was auto-generated by SourceMod (v1.5.0-dev+3697)
// ConVars for plugin "HardCoreFriendlyFire.smx"


// enables FFA mode
// -
// Default: "0"
HardCoreFriendlyFire_freeforall "0"

Special Thanks To

i want to say thanks to these guys
  • someone whom will get interested on my plugin and use this.



Change Log

all the date`s format is y/m/d
Code:

update at 2012 12 12(ver 1.0.0.0)
  • released



Guren 12-15-2012 10:59

Re: [CSS] HardCoreFriendlyFire
 
Genius.

alongub 02-19-2013 14:54

Re: [CSS] HardCoreFriendlyFire
 
Cache cvars instead of using GetConVarBool in event hooks.

You can also rewrite

Code:

stock bool:isClientConnectedIngameAlive(client){
       
        if(isClientConnectedIngame(client)){
               
                if(IsPlayerAlive(client) == true && IsClientObserver(client) == false){
                       
                        return true;
                       
                }else{
                       
                        return false;
                       
                }
               
        }else{
               
                return false;
               
        }
       
}

As

Code:

stock bool:isClientConnectedIngameAlive(client) {
        if (!isClientConnectedIngame(client))
                return false;

        return (IsPlayerAlive(client) == true && IsClientObserver(client) == false);       
}

Same for isClientConnectedIngame.

zeroibis 03-28-2013 16:04

Re: [CSS] HardCoreFriendlyFire
 
When trying to compile I get:
SourcePawn Compiler 1.4.2-dev
Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC

G:\Sm Plugins\HardCoreFriendlyFire\HardCoreFriendly Fire.sp(45) : error 100: function prototypes do not match
G:\Sm Plugins\HardCoreFriendlyFire\HardCoreFriendly Fire.sp(46) : error 100: function prototypes do not match
G:\Sm Plugins\HardCoreFriendlyFire\HardCoreFriendly Fire.sp(108) : error 017: undefined symbol "SDKHooks_TakeDamage"

3 Errors.

Compilation Time: 0.17 sec

zeroibis 03-29-2013 01:20

Re: [CSS] HardCoreFriendlyFire
 
It compiled when I used a newer version of SDKHOOKS.


All times are GMT -4. The time now is 13:41.

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