Fire Granade FIXED

A Config Script for Counter-Strike: Source

Greetings! 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 HL-Kozama points.
  • Post: Give HL-Kozama your thoughts on this Script.
  • Vote: Help HL-Kozama 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

Stop Lurking!

Sign up

Already a Bananite? Login

127 lines | 4 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
//// Molotov-cocktails By H.L  
//// Thanks SuperDave for the help!
//// Thanks to Mattie for Napalm, This is a child from them.
//// Thanks to Wonder for BananaBombs, This is a child from them.

block load
{
   es_xset cocktail_ver 1.0
   es_xmakepublic cocktail_ver
   es_xmsg #multi "#green[Molotov-cocktails]#defaultBy:#lightgreenHyper"
   es_setinfo cocktail_oldnoisy server_var(eventscripts_noisy)
   es_setinfo eventscripts_noisy 1
   //Set the Damage they enflict default 700
   es_setinfo cocktail_damage 700
   //Set there Damage radius default 250
   es_setinfo cocktail_radius 250
   es_xset molo 0
   es_xset nadenull 0
   es_xset nademodel 0
   es_xset handle 0
   es_xset index 0
   es_xset nadeindex 0
   es_xset playerhandle 0
   isnull nadenull eventscripts_currentmap
   ifx false(nadenull) do
   {
    es_xdoblock cocktail/precachemodel
    }
  es_xdoblock corelib/noisy_on
}

event es_map_start
{
   es_xdoblock cocktail/precachemodel
}

block precachemodel
{
   es_xprecachemodel nademodel "models/props_junk/garbage_glassbottle003a.mdl"
}

event weapon_fire
{
   if (event_var(weapon) = "hegrenade") then es_xdelayed 0.1 es_xdoblock cocktail/ignite
  {
      if (event_var(weapon) = "hegrenade") then es_emitsound player event_var(userid) ambient/fire/mtov_flame2.wav 1.0 0.3
      {
         if (grenade in event_var(weapon)) do
         {
          es_xdelayed 0.1 es_xdoblock cocktail/dochange
          }
       }
    }
}

block dochange
{
   es_xcreateentitylist molotov hegrenade_projectile
   es_xforeachkey molo in molotov "es_setindexprop server_var(molo) CBaseEntity.m_nModelIndex server_var(nademodel)"
   es_fire event_var(userid) hegrenade_projectile color "255 255 255"
   es_xkeygroupdelete molotov
}

event grenade_bounce
{
   es_xcexec_all play physics/glass/glass_bottle_impact_hard3.wav
}

event hegrenade_detonate
{
   es_xset origin 0
   es_format origin "origin %1 %2 %3" event_var(x) event_var(y) event_var(z)
   es_entcreate event_var(userid) env_fire
   es_xdelayed 0.1 es_xcexec_all play physics/glass/glass_bottle_break2.wav
   es_fire event_var(userid) hegrenade_projectile DispatchEffect WaterSurfaceExplosion
   es_fire event_var(userid) env_fire addoutput server_var(origin)
   es_fire event_var(userid) env_fire addoutput "firesize 220"
   es_fire event_var(userid) env_fire addoutput "health 4"
   es_fire event_var(userid) env_fire addoutput "firetype Normal"
   es_fire event_var(userid) env_fire addoutput "spawnflags 16 8 128"
   es_fire event_var(userid) env_fire addoutput "damagescale -1"
   es_fire event_var(userid) env_fire StartFire
   es_getplayerhandle playerhandle event_var(userid)
   es_xcreateentitylist grenadelist hegrenade_projectile
   es_xforeachkey index in grenadelist "es_getindexprop handle server_var(index) CBaseEntity.m_hOwnerEntity;if (server_var(handle) equalto server_var(playerhandle)) then es_xcopy nadeindex index"
   es_emitsound entity server_var(nadeindex) ambient/explosions/explode_8.wav 1.0 0.7
   es_xkeygroupdelete grenadelist
}

event player_hurt
{
   if (event_var(weapon) = "hegrenade") do
  {
   es_fire event_var(userid) !self ignite
   es_fire event_var(userid) entityflame addoutput "OnUser1 !self,kill,1,6"
   es_fire event_var(userid) entityflame FireUser1      
   }

}

block ignite
{
   es_fire event_var(userid) hegrenade_projectile ignite
   es_setinfo grenid 0
   es_getentityindex grenid hegrenade_projectile
   if (server_var(grenid) > 0 ) do
  {
   if (server_var(cocktail_damage) notlessthan 0) then es_xsetindexprop server_var(grenid) "CBaseCSGrenadeProjectile.baseclass.m_flDamage" server_var(cocktail_damage)
   if (server_var(cocktail_radius) notlessthan 0) then es_xsetindexprop server_var(grenid) "CBaseCSGrenadeProjectile.baseclass.m_DmgRadius" server_var(cocktail_radius)
  }
}

event player_death
{
   if (event_var(weapon) = "hegrenade") do
  {
   es_setinfo mystring 0    
   es_format mystring "%1 just killed %2 with a [Molotov-cocktail]!" event_var(es_attackername) event_var(es_username) event_var(weapon)
   es_msg server_var(mystring)
  }
}

block unload
{
   es_setinfo eventscripts_noisy server_var(cocktail_oldnoisy)
   es_xdoblock corelib/noisy_off
}
1.go to :cstrike\addons\eventscripts 2.Make es_FireGranade.txt 3.Open 4.Copy Script. 5.Save It 6.Play on Game 7."es_load firegranade" Put it to Console 8.Change Cocktail Damage To"100" 9.I hope You Like IT

Posts

None found

Share

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

More embeddable images

Bookmark and Share

Credits

Key Authors
H.L
Unknown
Original Authors
hYperHeart
Unknown

Submitter

HL-Kozama avatar
HL-Kozama Offline
Member Joined 8y
276 points Ranked 14002nd

HL-Kozama
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Attributes

Miscellaneous

Stats

Posts
0
Views
2,753
Date Added
7y
Date Modified
7y
bcp.crwdcntrl.net tracking pixel