Counter-Strike 1.6 Icon CS1.6 Script

Open doors with a shot! v1.0

SEX! Ok, we got your attention. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Rj. points.
  • Post: Give Rj. your thoughts on this Script.
  • Vote: Help Rj. win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Sound fun?

Sign up

Already a Bananite? Login

90 lines | 2 kb | Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>

#define VERSION "1.0"
#define pev_no_open pev_iuser4

new pCvarEnabled
new pCvarBlockDoorButtons
new g_iFwdSpawn

public plugin_init()  
{
        unregister_forward(FM_Spawn,g_iFwdSpawn)
       
        if(engfunc(EngFunc_FindEntityByString, FM_NULLENT, "classname","func_door_rotating") || engfunc(EngFunc_FindEntityByString, FM_NULLENT, "classname","func_door"))
        {              
                register_plugin("(ON) Open doors with a shot", VERSION, "Starsailor")  
               
                register_cvar("open_doors_version",VERSION,FCVAR_SERVER|FCVAR_SPONLY)
               
                pCvarEnabled = register_cvar("od_enabled", "1")
                pCvarBlockDoorButtons = register_cvar("od_filterdoors","0")
               
                RegisterHam(Ham_TraceAttack, "func_door_rotating", "ham_open_door")
                RegisterHam(Ham_TraceAttack, "func_door", "ham_open_door")
               
        }
        else
        {
                register_plugin("(OFF) Open doors with a shot", VERSION, "Starsailor")
                pause("ad")
        }
}

public plugin_precache()
{
        g_iFwdSpawn = register_forward(FM_Spawn,"fw_Spawn")
}

public ham_open_door(iEnt, iAttacker, Float:fDamage, Float:vDirection[3], TraceHandle, iDamageBits)
{      
        if(!get_pcvar_num(pCvarEnabled))
        {
                return HAM_IGNORED
        }
       
        if(get_pcvar_num(pCvarBlockDoorButtons) && pev(iEnt,pev_no_open))
        {
                return HAM_IGNORED
        }
       
        dllfunc(DLLFunc_Use, iEnt, iAttacker)
        return HAM_IGNORED
}

public fw_Spawn(iEnt)
{
        if(!pev_valid(iEnt))
        {
                return FMRES_IGNORED
        }
       
        new szClassName[32]
        pev(iEnt,pev_classname,szClassName,charsmax(szClassName))
       
        if(!equal(szClassName,"func_button"))
        {
                return FMRES_IGNORED
        }
       
        new szTargetName[32]
        new iTarget
        pev(iEnt, pev_target, szTargetName,charsmax(szTargetName))
       
        iTarget = 0
        new szClassName2[32]
        while((iTarget = engfunc(EngFunc_FindEntityByString, iTarget, "targetname", szTargetName)))
        {
                pev(iTarget,pev_classname,szClassName2,charsmax(szClassName2))
               
                if(equal(szClassName2,"func_door") || equal(szClassName2,"func_door_rotating"))
                {
                        set_pev(iTarget,pev_no_open,1)
                }
        }
       
        return FMRES_IGNORED
}
Open doors with a shot! v1.0
Another simple useless? plugin by me

Description:
With this plugin, you can open the doors with a simple shot from any weapons.

Cvars: 
od_enabled (0|1) Enables|Disables plugin. Default 1
od_filterdoors (0|1) Enables|Disables the filter to doors that are opened with buttons. Default 0

Modules:
Fakemeta & Hamsandwich

Credits:
Sn!ff3r: Hamsandwich way.
r3v0idi0t: Video

Changelog:
Code:
v1.0: First release

Suggestions are welcome (:
https://forums.alliedmods.net/showthread.php?p=1143062?p=1143062

Posts

None found

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Original Authors
Starsailor
AMXX Script/Codes

Submitter

Rj. avatar
Rj. Dreamin'
Member Joined 11mo
349 points Ranked 11289th
35 medals 4 legendary 9 rare
  • Submitted 15 Tools Medal icon
  • Submitted 50 Gamefiles Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
  • Thanked 500 submitters Medal icon
  • 2nd Place - Game Poetry Contest Medal icon
  • Submitted 5 Tools Medal icon

Rj.
Redistributor
Are you the owner? Request Ownership
Send a Private Message to the submitter

Category

Attributes

Language
Pawn (AMXMODX)

Stats

Posts
0
Views
295
Date Added
1mo