I've been given an anti-explosion plugin, although it's stopping the explosion from damaging the players. I want to try and make it deal damage like it used to, but I have no knowledge in coding SourcePawn for SourceMod whatsoever.
Code: Select all
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#define PLUGIN_VERSION "1.0.0"
new Handle:g_hMethod = INVALID_HANDLE;
public Plugin:myinfo =
{
name = "Anti Env Explosions",
author = "Panduh (AlliedMods: thetwistedpanda)",
description = "Potentially assists in resolving crashes relating to env_explosion entities.",
version = PLUGIN_VERSION,
url = "http://forums.alliedmods.net"
}
public OnPluginStart()
{
g_hMethod = CreateConVar("env_explosions_method", "0", "Determines method for handling env_explosion entities. (0 = Nullify Effect, 1 = Kill in OnEntityCreated)", FCVAR_NONE, true, 0.0, true, 1.0);
AutoExecConfig(true, "env_explosions");
}
public OnEntityCreated(entity, const String:classname[])
{
if(entity > 0)
{
if(StrEqual(classname, "env_explosion"))
CreateTimer(0.0, Timer_OnEntityCreated, EntIndexToEntRef(entity));
}
}
public Action:Timer_OnEntityCreated(Handle:owner, any:ref)
{
new entity = EntRefToEntIndex(ref);
if(entity != INVALID_ENT_REFERENCE && IsValidEdict(entity))
{
if(GetConVarBool(g_hMethod))
AcceptEntityInput(entity, "Kill");
else
{
SetEntProp(entity, Prop_Data, "m_iMagnitude", 0);
SetEntProp(entity, Prop_Data, "m_iRadiusOverride", 0);
SetEntPropFloat(entity, Prop_Data, "m_flDamageForce", 0.0);
SetEntProp(entity, Prop_Data, "m_nNextThinkTick", -1);
}
}
}
Intel Xeon E3-1270v3 (Haswell 3.5ghz) node with 4 total processor cores and 32 gigabytes of RAM. OS: Windows
SourceMod 1.5.3-dev+3954, by AlliedModders LLC
[SM] Listing 42 plugins:
01 "Admin File Reader" (1.5.3-dev+3954) by AlliedModders LLC
02 "Admin Help" (1.5.3-dev+3954) by AlliedModders LLC
03 "Admin Menu" (1.5.3-dev+3954) by AlliedModders LLC
04 "AllChat" (1.1.1) by Frenzzy
05 "Anti-Flood" (1.5.3-dev+3954) by AlliedModders LLC
06 "Basic Chat" (1.5.3-dev+3954) by AlliedModders LLC
07 "Basic Comm Control" (1.5.3-dev+3954) by AlliedModders LLC
08 "Basic Commands" (1.5.3-dev+3954) by AlliedModders LLC
09 "Basic Info Triggers" (1.5.3-dev+3954) by AlliedModders LLC
10 "Basic Votes" (1.5.3-dev+3954) by AlliedModders LLC
11 "Client Preferences" (1.5.3-dev+3954) by AlliedModders LLC
12 "Divine Plugin" (1.0) by Bob Loblaw
13 "Fun Commands" (1.5.3-dev+3954) by AlliedModders LLC
14 "Simple GoTo Command" (1.3.4) by BB
15 "Infinite Jumping" (2.15) by Chanz
16 "MapChooser" (1.5.3-dev+3954) by AlliedModders LLC
17 "Nextmap" (1.5.3-dev+3954) by AlliedModders LLC
18 "No Block" (1.0.0.0) by sslice
19 "Map Nominations" (1.5.3-dev+3954) by AlliedModders LLC
20 "PermaMute" (0.1) by Ryan "FLOOR_MASTER" Mannion
21 "Player Commands" (1.5.3-dev+3954) by AlliedModders LLC
22 "Player Respawn" (1.4) by Rogue
23 "Rock The Vote" (1.5.3-dev+3954) by AlliedModders LLC
24 "Simple Chat Processor" (1.0.2) by Simple Plugins
25 "Sound Commands" (1.5.3-dev+3954) by AlliedModders LLC
26 "SourceBans" (1.4.10) by SourceBans Development Team
27 "[Store] Backend" (1.1-alpha) by alongub
28 "[Store] Chat" (1.1.0) by Panduh
29 "[Store] Core" (1.1-alpha) by alongub
30 "[Store] Distributor" (1.1-alpha) by alongub
31 "[Store] Equipment" (1.1-alpha) by alongub
32 "[Store] Gifting" (1.1-alpha) by alongub
33 "[Store] Inventory" (1.1-alpha) by alongub
34 "[Store] Loadout" (1.1-alpha) by alongub
35 "[Store] Logging" (1.1-alpha) by alongub
36 "[Store] Refund" (1.1-alpha) by alongub
37 "[Store] Shop" (1.1-alpha) by alongub
38 "[Store] Titles" (1.1-alpha) by alongub
39 "[Store] Trails" (1.1-alpha) by alongub
40 "TeamSwitch" (1.3) by MistaGee
41 "Updater" (1.1.5) by GoD-Tony
42 "[XIX] Tower Defense Plugin" (1.0.4) by Dark Session and [XIX]
"Automatic Updater" (1.5.3-dev+3954) by AlliedModders LLC: Updates SourceMod gamedata files
"Webternet" (1.5.3-dev+3954) by AlliedModders LLC: Extension for interacting with URLs
"CS Tools" (1.5.3-dev+3954) by AlliedModders LLC: CS extended functionality
"BinTools" (1.5.3-dev+3954) by AlliedModders LLC: Low-level C/C++ Calling API
"SDK Tools" (1.5.3-dev+3954) by AlliedModders LLC: Source SDK Tools
"Top Menus" (1.5.3-dev+3954) by AlliedModders: Creates sorted nested menus
"Client Preferences" (1.5.3-dev+3954) by AlliedModders: Saves client preference settings
"SQLite" (1.5.3-dev+3954) by AlliedModders LLC: SQLite Driver
"SDK Hooks" (1.5.3-dev+3954) by AlliedModders LLC: Source SDK Hooks
"Socket" (3.0.1) by Player: Socket extension for SourceMod
Metamod:Source version 1.10.1-dev
Build ID: 870897dd343038-dev
Loaded As: Valve Server Plugin
Compiled on: Oct 24 2013
Plugin interface version: 15:14
SourceHook version: 5:5
Listing 5 plugins:
[01] SourceMod (1.5.3-dev+3954) by AlliedModders LLC
[02] CS Tools (1.5.3-dev+3954) by AlliedModders LLC
[03] SDK Tools (1.5.3-dev+3954) by AlliedModders LLC
[04] SDK Hooks (1.5.3-dev+3954) by AlliedModders LLC
[05] SteamTools (0.8.3) by Asher Baker (asherkin)