[Half-Life AMXX] / dmgdoors.sma Repository:
ViewVC logotype

Annotation of /dmgdoors.sma

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25 - (view) (download)

1 : ian 1 /*
2 :     DMG Doors v0.1
3 :     Copyright (C) 2007 Ian (Juan) Cammarata
4 :    
5 : ian 25 This program is free software: you can redistribute it and/or modify
6 :     it under the terms of the GNU Affero General Public License as
7 :     published by the Free Software Foundation, either version 3 of the
8 :     License, or (at your option) any later version.
9 : ian 1
10 : ian 25 This program is distributed in the hope that it will be useful,
11 :     but WITHOUT ANY WARRANTY; without even the implied warranty of
12 :     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 :     GNU Affero General Public License for more details.
14 : ian 1
15 : ian 25 You should have received a copy of the GNU Affero General Public License
16 :     along with this program. If not, see <http://www.gnu.org/licenses/>.
17 :     --------------------------------------------------------------------------------
18 : ian 1
19 :     Created by Ian (Juan) Cammarata
20 :     http://ian.cammarata.us
21 :     AMXX 1.76d
22 :     5/2/2007 5:34:33 AM
23 :    
24 :     Description:
25 :     When enabled this plugin adds damage to sliding doors, or sliding and hinged
26 :     doors. The amount of damage dealt is also configurable. The main purpose for
27 :     the writing of the plugin was to prevent message flooding caused by players
28 :     getting stuck in a door, which sometimes results in all nearby players getting
29 :     dropped from the server, but it's also just kinda fun.
30 :    
31 :     Cvars (First value is default):
32 :     dmgdoors < 2 (all doors) | 0 (disabled) | 1 (only sliding doors) >
33 :     dmgdoors_dmg < 9999 | ... > : How much damage the doors will do.
34 :    
35 :     Notes:
36 :     Changes to cvars only take affect after a map change.
37 :    
38 :     Change Log:
39 :     Key (+ added | - removed | c changed | f fixed)
40 :    
41 :     V? (June 06, 2007)
42 :    
43 :     -: Removed debug message
44 :     V0.1 (June 02, 2007)
45 :     !Initial Release
46 :     */
47 :     #include <amxmodx>
48 :     #include <engine>
49 :    
50 :     #define VERSION "0.1"
51 :    
52 :     public pfn_keyvalue(ent){
53 :     static old_ent=0,key_val[20],mode,dmg[6]
54 :     new ent_class[1],key_name[1]
55 :    
56 :     if(!old_ent){
57 :     mode=get_cvar_num("dmgdoors")
58 :     get_cvar_string("dmgdoors_dmg",dmg,5)
59 :     }
60 :     else if(ent!=old_ent){
61 :     if(equal(key_val,"func_door")&&mode>0)
62 :     DispatchKeyValue(old_ent,"dmg",dmg)
63 :     else if(equal(key_val,"func_door_rotating")&&mode>1)
64 :     DispatchKeyValue(old_ent,"dmg",dmg)
65 :     copy_keyvalue(ent_class,0,key_name,0,key_val,19)
66 :     }
67 :    
68 :     old_ent=ent
69 :     }
70 :    
71 :     public plugin_init(){
72 :     register_plugin("DMG Doors",VERSION,"Ian Cammarata")
73 :     register_cvar("dmgdoors_version",VERSION,FCVAR_SERVER)
74 :     register_cvar("dmgdoors","2")
75 :     register_cvar("dmgdoors_dmg","9999")
76 : ian 25 }

Contact
ViewVC Help
Powered by ViewVC 1.0.4