Half-Life: Opposing Force Icon HL:OF Script

[AMXX][OP4] Monstername

Yo, buddy. 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

Resistance is futile...

Sign up

Already a Bananite? Login

178 lines | 7 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
/*     
*       Opposing Force Coop Monster Name
*
*                                             by GordonFreeman
*                               http://gordonfreeman.hldm.org/
*/


#include <amxmodx>
#include <fakemeta>

new Trie:g_mnames
new Trie:g_indefy
new Trie:g_health

new g_maxplayers
new skill

public plugin_init(){
        register_plugin("Monster Name","0.3","GordonFreeman")
       
        g_mnames = TrieCreate()
        g_indefy = TrieCreate()
        g_health = TrieCreate()
       
        TrieSetString(g_mnames,"monster_headcrab","Headcrab")
        TrieSetString(g_mnames,"monster_bullchicken","Bullsquid")
        TrieSetString(g_mnames,"monster_barnacle","Barnacle")   // cool thing
        TrieSetString(g_mnames,"monster_houndeye","Houndeye")
        TrieSetString(g_mnames,"monster_alien_slave","Alien Slave")
        TrieSetString(g_mnames,"monster_alien_controller","Alien Controller")
        TrieSetString(g_mnames,"monster_alien_grunt","Alien Grunt")
        TrieSetString(g_mnames,"monster_alien_voltigore","Voltigore")
        TrieSetString(g_mnames,"monster_alien_babyvoltigore","Baby Voltigore")
        TrieSetString(g_mnames,"monster_shocktrooper","Shocktrooper")
        TrieSetString(g_mnames,"monster_zombie","Zombie")
        TrieSetString(g_mnames,"monster_zombie_barney","Zombie Barney")
        TrieSetString(g_mnames,"monster_zombie_soldier","Zombie Soldier")
        TrieSetString(g_mnames,"monster_ichthyosaur","Ichthyosaur")
        TrieSetString(g_mnames,"monster_gonome","Gonome")       // hate it!
        TrieSetString(g_mnames,"monster_pitdrone","Pitdrone")
        TrieSetString(g_mnames,"monster_human_assassin","Blackop Assassin")
        TrieSetString(g_mnames,"monster_male_assassin","Blackop Soldier")
        TrieSetString(g_mnames,"monster_shockroach","Shockroach")
        TrieSetString(g_mnames,"monster_blkop_apache","Blackop Apache")
        TrieSetString(g_mnames,"monster_otis","Otis")
        TrieSetString(g_mnames,"monster_barney","Barney")
        TrieSetString(g_mnames,"monster_gman",/*"Gordon FreeMan"*/"G-Man")
        TrieSetString(g_mnames,"monster_human_grunt_ally","Soldier")
        TrieSetString(g_mnames,"monster_human_torch_ally","Engineer")
        TrieSetString(g_mnames,"monster_human_medic_ally","Medic")
        TrieSetString(g_mnames,"monster_scientist","Scientist")
        TrieSetString(g_mnames,"monster_cleansuit_cleansuit","Scientist")
       
        TrieSetCell(g_indefy,"monster_headcrab",1)
        TrieSetCell(g_indefy,"monster_bullchicken",1)
        TrieSetCell(g_indefy,"monster_barnacle",1)
        TrieSetCell(g_indefy,"monster_houndeye",1)
        TrieSetCell(g_indefy,"monster_alien_slave",1)
        TrieSetCell(g_indefy,"monster_alien_controller",1)
        TrieSetCell(g_indefy,"monster_alien_grunt",1)
        TrieSetCell(g_indefy,"monster_alien_voltigore",1)
        TrieSetCell(g_indefy,"monster_alien_babyvoltigore",1)
        TrieSetCell(g_indefy,"monster_shocktrooper",1)
        TrieSetCell(g_indefy,"monster_zombie",1)
        TrieSetCell(g_indefy,"monster_zombie_barney",1)
        TrieSetCell(g_indefy,"monster_zombie_soldier",1)
        TrieSetCell(g_indefy,"monster_ichthyosaur",1)
        TrieSetCell(g_indefy,"monster_gonome",1)
        TrieSetCell(g_indefy,"monster_pitdrone",1)
        TrieSetCell(g_indefy,"monster_human_assassin",1)
        TrieSetCell(g_indefy,"monster_male_assassin",1)
        TrieSetCell(g_indefy,"monster_shockroach",1)
        TrieSetCell(g_indefy,"monster_blkop_apache",1)
       
        TrieSetCell(g_indefy,"monster_otis",2)
        TrieSetCell(g_indefy,"monster_barney",2)
        TrieSetCell(g_indefy,"monster_gman",2)
        TrieSetCell(g_indefy,"monster_human_grunt_ally",2)
        TrieSetCell(g_indefy,"monster_human_torch_ally",2)
        TrieSetCell(g_indefy,"monster_human_medic_ally",2)
        TrieSetCell(g_indefy,"monster_scientist",2)
        TrieSetCell(g_indefy,"monster_cleansuit_scientist",2)

        g_maxplayers = get_maxplayers()
}

public plugin_cfg(){
        skill = get_cvar_num("skill")
               
        TrieSetCell(g_health,"monster_headcrab",get_monster_health("sk_headcrab_health"))
        TrieSetCell(g_health,"monster_bullchicken",get_monster_health("sk_bullsquid_health"))
        TrieSetCell(g_health,"monster_barnacle",15)
        TrieSetCell(g_health,"monster_houndeye",get_monster_health("sk_houndeye_health"))
        TrieSetCell(g_health,"monster_alien_slave",get_monster_health("sk_islave_health"))
        TrieSetCell(g_health,"monster_alien_controller",get_monster_health("sk_controller_health"))
        TrieSetCell(g_health,"monster_alien_grunt",get_monster_health("sk_agrunt_health"))
        TrieSetCell(g_health,"monster_alien_voltigore",get_monster_health("sk_voltigore_health"))
        TrieSetCell(g_health,"monster_alien_babyvoltigore",get_monster_health("sk_babyvoltigore_health"))
        TrieSetCell(g_health,"monster_shocktrooper",get_monster_health("sk_shocktrooper_health"))
        TrieSetCell(g_health,"monster_zombie",get_monster_health("sk_zombie_health"))
        TrieSetCell(g_health,"monster_zombie_barney",get_monster_health("sk_zombie_barney_health"))
        TrieSetCell(g_health,"monster_zombie_soldier",get_monster_health("sk_zombie_soldier_health"))
        TrieSetCell(g_health,"monster_ichthyosaur",get_monster_health("sk_ichthyosaur_health"))
        TrieSetCell(g_health,"monster_gonome",get_monster_health("sk_gonome_health"))
        TrieSetCell(g_health,"monster_pitdrone",get_monster_health("sk_pitdrone_health"))
        TrieSetCell(g_health,"monster_human_assassin",get_monster_health("sk_hassassin_health"))
        TrieSetCell(g_health,"monster_male_assassin",get_monster_health("sk_massassin_health"))
        TrieSetCell(g_health,"monster_shockroach",get_monster_health("sk_shockroach_health"))
        TrieSetCell(g_health,"monster_blkop_apache",get_monster_health("sk_apache_health"))
        TrieSetCell(g_health,"monster_otis",get_monster_health("sk_otis_health"))
        TrieSetCell(g_health,"monster_barney",get_monster_health("sk_barney_health"))
        TrieSetCell(g_health,"monster_gman",1337)
        TrieSetCell(g_health,"monster_human_grunt_ally",get_monster_health("sk_hgrunt_ally_health"))
        TrieSetCell(g_health,"monster_human_torch_ally",get_monster_health("sk_torch_ally_health"))
        TrieSetCell(g_health,"monster_human_medic_ally",get_monster_health("sk_medic_ally_health"))
        TrieSetCell(g_health,"monster_scientist",get_monster_health("sk_scientist_health"))
        TrieSetCell(g_health,"monster_cleansuit_scientist",get_monster_health("sk_cleansuit_scientist_health"))
}

public client_putinserver(id)
        set_task(0.1,"fw_PlayerPostThink",id,.flags="b")
       
public client_disconnect(id)
        remove_task(id)

public fw_PlayerPostThink(id){
        static ent,bh
        static classname[32],color[3],hpinfo[18]
       
        get_user_aiming(id,ent,bh)
       
        if(!ent)
                return
               
        static health,armor
               
        if(0<ent<=g_maxplayers){
                get_user_name(ent,classname,31)
                health = get_user_health(id)
                armor = get_user_armor(id)
               
                color = {0,255,0}
               
                formatex(hpinfo,17,"(%d/%d)",health,armor)
        }else{
                pev(ent,pev_classname,classname,31)
               
                if(pev(ent,pev_deadflag)!=DEAD_NO)
                        return
               
                TrieGetCell(g_indefy,classname,armor)
               
                switch(armor){
                        case 1: color = {255,0,0}
                        case 2: color = {0,255,0}
                        default: return
                }

                TrieGetCell(g_health,classname,health)
                health = pev(ent,pev_health)*100/health
               
                armor = 0
               
                TrieGetString(g_mnames,classname,classname,31)
               
                formatex(hpinfo,17,"(%d)",health)
        }
       
        set_hudmessage(color[0], color[1], color[2], -1.0, 0.60, 1, 1.0, 0.4, 0.01, 0.01, -1)
        show_hudmessage(id,"%s %s",classname,hpinfo)
}

get_monster_health(cvar[]){
        new cv[25]
        formatex(cv,24,"%s%d",cvar,skill)
       
        return get_cvar_num(cv)
}
Opposing Foce Monster Name

Description:
Show monster's and players's name with health and armor where player aimning. For Opposing Force Coop.

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
GordonFreeman (RU)
AMXX Script/Codes

Submitter

Rj. avatar
Rj. avatar Dreamin'
Member Joined 10mo
655 points Ranked 6621st
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. avatar
Rj.

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

Category

Attributes

Language
Pawn (AMXMODX)

Stats

Posts
0
Views
41
Date Added
4d
Date Modified
4d