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

L4D Friendly Fire damage remover


Post New Thread Reply   
 
Thread Tools Display Modes
prizegotti
Junior Member
Join Date: Dec 2008
Old 12-24-2008 , 05:35   Re: L4D Friendly Fire damage remover
Reply With Quote #11

Whats the point of this? Why not just turn it off in the admin menu?
prizegotti is offline
santaclaus
Senior Member
Join Date: Dec 2008
Old 12-28-2008 , 17:50   Re: L4D Friendly Fire damage remover
Reply With Quote #12

Request : Can u add a cvar to make the FF remover only active in the safe room ?
__________________

santaclaus is offline
r5053
SourceMod Donor
Join Date: May 2007
Location: Germany
Old 12-28-2008 , 19:10   Re: L4D Friendly Fire damage remover
Reply With Quote #13

maybe i will check this later, maybe i could hook the spawn room door
__________________
Visit HLPortal.de (this is not my Page)


r5053 is offline
Send a message via ICQ to r5053 Send a message via Skype™ to r5053
xanthra
Junior Member
Join Date: Dec 2008
Old 01-05-2009 , 11:56   Re: L4D Friendly Fire damage remover
Reply With Quote #14

Quote:
Originally Posted by r5053 View Post
maybe i will check this later, maybe i could hook the spawn room door
dooooooooooo it...i will have your babies if you get this to work. Nothing is worse than someone tk'ing and leaving, although they could still just type kill....which is gay.
xanthra is offline
The JCS
AlliedModders Donor
Join Date: Jan 2007
Location: Brazil
Old 01-05-2009 , 12:34   Re: L4D Friendly Fire damage remover
Reply With Quote #15

Quote:
Originally Posted by r5053 View Post
maybe i will check this later, maybe i could hook the spawn room door
Hook the player_left_start_area event. It's not perfect, since you need to check if the door is open, but it's enough.

You could try to hook door_open, it sends a boolean value tho checkpoints (maybe the red doors? or the respawn room doors?). The rescue_door_open event maybe usefull too.
The JCS is offline
Send a message via MSN to The JCS
r5053
SourceMod Donor
Join Date: May 2007
Location: Germany
Old 01-05-2009 , 13:32   Re: L4D Friendly Fire damage remover
Reply With Quote #16

Quote:
Originally Posted by The JCS View Post
Hook the player_left_start_area event. It's not perfect, since you need to check if the door is open, but it's enough.

You could try to hook door_open, it sends a boolean value tho checkpoints (maybe the red doors? or the respawn room doors?). The rescue_door_open event maybe usefull too.
that's what i've planed
__________________
Visit HLPortal.de (this is not my Page)


r5053 is offline
Send a message via ICQ to r5053 Send a message via Skype™ to r5053
r5053
SourceMod Donor
Join Date: May 2007
Location: Germany
Old 01-05-2009 , 16:45   Re: L4D Friendly Fire damage remover
Reply With Quote #17

update is released & tested
__________________
Visit HLPortal.de (this is not my Page)


r5053 is offline
Send a message via ICQ to r5053 Send a message via Skype™ to r5053
santaclaus
Senior Member
Join Date: Dec 2008
Old 01-05-2009 , 20:10   Re: L4D Friendly Fire damage remover
Reply With Quote #18

Great thx :woot:
__________________

santaclaus is offline
Ponta
New Member
Join Date: Jan 2009
Old 01-05-2009 , 21:53   Re: L4D Friendly Fire damage remover
Reply With Quote #19

New Plugin
Convar is used in this version. (not sv_cheats 1)

plugin load => Friendly Fire "OFF"
plugin unload => Friendly Fire "ON"

Code:
#pragma semicolon 1

#include <sourcemod>

#define PLUGIN_VERSION "1.1.0"

public Plugin:myinfo =
{
    name = "L4D Friendly Fire damage remover EX",
    author = "Ponta",
    description = "L4D TA Blocker",
    version = PLUGIN_VERSION,
    url = ""
};

new String:Cvar[4][] = 
{
    "survivor_friendly_fire_factor_easy,0",
    "survivor_friendly_fire_factor_normal,0.1",
    "survivor_friendly_fire_factor_hard,0.5",
    "survivor_friendly_fire_factor_expert,1"
};

public OnPluginStart()
{
    Change_Cvar(false);
}

public OnPluginEnd()
{
    Change_Cvar(true);
}

Change_Cvar(bool:flag)
{
    decl String:value[2][255];
    
    for(new i=0;i<4;i++)
    {
        ExplodeString(Cvar[i], ",", value, 2,255);
        if(!flag)
        {
            value[1][0]='0';
            value[1][1]='\0';
        }
        SetConVarString(FindConVar(value[0]), value[1], true);
        LogMessage("Changed Cvar:\"%s\" Value:\"%s\"",value[0],value[1]);
    }

}

Last edited by Ponta; 01-05-2009 at 23:22.
Ponta is offline
r5053
SourceMod Donor
Join Date: May 2007
Location: Germany
Old 01-06-2009 , 15:17   Re: L4D Friendly Fire damage remover
Reply With Quote #20

Quote:
Originally Posted by Ponta View Post
New Plugin
Convar is used in this version. (not sv_cheats 1)

plugin load => Friendly Fire "OFF"
plugin unload => Friendly Fire "ON"

Code:
#pragma semicolon 1

#include <sourcemod>

#define PLUGIN_VERSION "1.1.0"

public Plugin:myinfo =
{
    name = "L4D Friendly Fire damage remover EX",
    author = "Ponta",
    description = "L4D TA Blocker",
    version = PLUGIN_VERSION,
    url = ""
};

new String:Cvar[4][] = 
{
    "survivor_friendly_fire_factor_easy,0",
    "survivor_friendly_fire_factor_normal,0.1",
    "survivor_friendly_fire_factor_hard,0.5",
    "survivor_friendly_fire_factor_expert,1"
};

public OnPluginStart()
{
    Change_Cvar(false);
}

public OnPluginEnd()
{
    Change_Cvar(true);
}

Change_Cvar(bool:flag)
{
    decl String:value[2][255];
    
    for(new i=0;i<4;i++)
    {
        ExplodeString(Cvar[i], ",", value, 2,255);
        if(!flag)
        {
            value[1][0]='0';
            value[1][1]='\0';
        }
        SetConVarString(FindConVar(value[0]), value[1], true);
        LogMessage("Changed Cvar:\"%s\" Value:\"%s\"",value[0],value[1]);
    }

}
changing the cvars is a good idea after i checked this, this methode to block demage will get merged into the plugin, then it makes sense.
The Cvar methode else doesn't require a extra plugin, puting this:
sm_cvar survivor_friendly_fire_factor_normal 0
sm_cvar survivor_friendly_fire_factor_hard 0
sm_cvar survivor_friendly_fire_factor_expert 0
into the cfg file would do the same.
But merged into the new version of my plugin it makes sense because with the last update it's able to remove the ta demage only inside the spawn room.
__________________
Visit HLPortal.de (this is not my Page)



Last edited by r5053; 01-06-2009 at 15:33.
r5053 is offline
Send a message via ICQ to r5053 Send a message via Skype™ to r5053
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 06:05.


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