Half-Life Icon HL Script

[AMXX] Destroyable Satchel Charge

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

Join the community!

Sign up

Already a Bananite? Login

36 lines | 917 bytes | 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
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <hlsdk_const>

#define PLUGIN "Destroyable Satchel Charge"
#define VERSION "1.2"
#define AUTHOR "Anggara_nothing"

new g_enable, g_health;
public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        register_forward(FM_SetModel,"FORWARD_SET_MODEL");
        g_enable = register_cvar("hl_satchel", "1")
        g_health = register_cvar("hl_satchel_health", "100")
}

public FORWARD_SET_MODEL(entid, model[])
{      
        if(!get_pcvar_num(g_enable) || !pev_valid(entid) || !equal(model,"models/w_satchel.mdl"))
                return FMRES_IGNORED;
       
        static id;
        id = pev(entid,pev_owner);
       
        if (!id || !is_user_connected(id) || !is_user_alive(id))
                return FMRES_IGNORED;
       
        new Float:health = get_pcvar_float(g_health)
        set_pev(entid,pev_health,health);
        set_pev(entid,pev_takedamage,DAMAGE_YES);
       
        return FMRES_IGNORED;
}
DESCRIPTION
You can destroy your enemy's satchel charge. 
Cvars :
hl_satchel ----- Enable/disable this plug-in.(default: 1)
hl_satchel_health ----- How much satchel charge's health. (default: 100)
Change logs :
1.0 --- First release
1.2 --- Optimizing plug-in
Remove fun module [required]

Comments

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
anggara_nothing
Member Joined 8 years ago
AMXX Script/Codes

Submitter

Rj. avatar
Rj. IN PLAYGROUND
Homepage
Member Joined 9 months ago
34 medals 4 legendary 8 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
135
Date Added
1 month ago
Feb 26 2017 @ 5:29pm UTC
Date Updated
1 month ago
Feb 26 2017 @ 5:29pm UTC