Raised This Month: $106 Target: $400
 26% 

Removing Bomb Damage Completely


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Endoint
Junior Member
Join Date: Oct 2018
Old 11-12-2018 , 04:56   Removing Bomb Damage Completely
Reply With Quote #1

Hi,

I'm after a plugin that removes bomb damage entirely.
I'd basically like the bomb to never effect players on my server, but obviously still have grenade damage, etc.

I have read over this plugin, but it seems that this firstly; only removes bomb damage after the round ends, and secondly, seems to only have the ability to set this for specific admin flags, rather than for the entire server and anyone who enters it.

Does anyone know of any plugin that will do what i'm after?

Thanks.
Endoint is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Lazytown
Old 11-12-2018 , 10:25   Re: Removing Bomb Damage Completely
Reply With Quote #2

Code:
#include <sourcemod>
#include <sdkhooks>

#define PLUGIN_VERSION "2.1"

public Plugin myinfo = 
{
	name = "No Bomb Damage",
	author = "Keith Warren (Shaders Allen)",
	description = "Stops all damage from bombs occuring to players.",
	version = PLUGIN_VERSION,
	url = "http://github.com/shadersallen"
}

public void OnPluginStart()
{
	for (int i = 1; i <= MaxClients; i++)
	{
		if (IsClientInGame(i))
			OnClientPutInServer(i);
	}
}

public void OnClientPutInServer(int client)
{	
	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}

public Action OnTakeDamage(int victim, int& attacker, int& inflictor, float& damage, int& damagetype)
{
	if (!IsValidEntity(inflictor))
		return Plugin_Continue;
	
	char class[32];
	GetEntityClassname(inflictor, class, sizeof(class));
	
	if (!StrEqual(class, "planted_c4", false))
		return Plugin_Continue;
	
	damage = 0.0;
	return Plugin_Changed;
}
Attached Files
File Type: sp Get Plugin or Get Source (nobombdamage.sp - 22 views - 927 Bytes)
__________________
I sometimes do commissions. [ADD ME]

Last edited by Drixevel; 11-12-2018 at 10:26.
Drixevel is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-12-2018 , 10:48   Re: Removing Bomb Damage Completely
Reply With Quote #3

There are on some maps env_explosion added in bombsite, to create more effect when c4 explode.
So those can hurt players also when they are too near.
Bacardi is offline
Endoint
Junior Member
Join Date: Oct 2018
Old 11-12-2018 , 18:05   Re: Removing Bomb Damage Completely
Reply With Quote #4

Quote:
Originally Posted by Drixevel View Post
Code:
#include <sourcemod>
#include <sdkhooks>

#define PLUGIN_VERSION "2.1"

public Plugin myinfo = 
{
	name = "No Bomb Damage",
	author = "Keith Warren (Shaders Allen)",
	description = "Stops all damage from bombs occuring to players.",
	version = PLUGIN_VERSION,
	url = "http://github.com/shadersallen"
}

public void OnPluginStart()
{
	for (int i = 1; i <= MaxClients; i++)
	{
		if (IsClientInGame(i))
			OnClientPutInServer(i);
	}
}

public void OnClientPutInServer(int client)
{	
	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}

public Action OnTakeDamage(int victim, int& attacker, int& inflictor, float& damage, int& damagetype)
{
	if (!IsValidEntity(inflictor))
		return Plugin_Continue;
	
	char class[32];
	GetEntityClassname(inflictor, class, sizeof(class));
	
	if (!StrEqual(class, "planted_c4", false))
		return Plugin_Continue;
	
	damage = 0.0;
	return Plugin_Changed;
}

Wow thank you kind sir

Quote:
Originally Posted by Bacardi View Post
There are on some maps env_explosion added in bombsite, to create more effect when c4 explode.
So those can hurt players also when they are too near.
Which maps are you talking about? Is there a way around this?
Endoint is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-12-2018 , 21:35   Re: Removing Bomb Damage Completely
Reply With Quote #5

Quote:
Originally Posted by Endoint View Post
Which maps are you talking about? Is there a way around this?
well I don't know, which maps have those.
Cs:s has at least in map de_dust2. It's rare object after all.

I just mention it so you would not be suprised if player die at event c4 explosion.
__________________
Bacardi is offline
Reply


Thread Tools
Display Modes

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 13:46.


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