Forum

> > CS2D > Scripts > How to make stun grenade? [SOLVED]
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to make stun grenade? [SOLVED]

4 replies
To the start Previous 1 Next To the start

old How to make stun grenade? [SOLVED]

KenVo
User Off Offline

Quote
I made a stun grenade script but now I can't make the flashbang and the flare to slow the enemy down because they don't hit enemy...any help?
1
2
3
4
5
6
7
8
9
10
addhook("hit","hitx")
function hitx(id,source,weapon,hpdmg,apdmg)
     if (weapon==51) then
          parse("speedmod "..id.." -20")
          function speedx ()
          parse("speedmod "..id.." 0")
     end
          timer(3000,"speedx")
end
end
edited 4×, last 24.03.11 09:24:51 am

old Re: How to make stun grenade? [SOLVED]

Surplus
User Off Offline

Quote
Thats with a say cmd, not granade.
You could use hook hit.

1
2
3
4
5
addhook("hit","freezmeh")
	function freezmeh(id)
		if weapon=balblabl then
	parse("speedmod "..id.." 0")
end

I know that isnt correct, i just havent got the time to make the script.

old Re: How to make stun grenade? [SOLVED]

KenVo
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
addhook("hit","hitx")
function hitx(id,source,weapon,hpdmg,apdmg)
	if (weapon==51) then
		parse("speedmod "..id.." -20")
		function speedx ()
		parse("speedmod "..id.." 0")
	end
		timer(3000,"speedx")
  end
end
lol here's the script that i made it slow the target down for 3 seconds

but i'm wondering how to make flare,flashbang slow the enemy down?

old How?

Dovahkin
User Off Offline

Quote
How to put,When you are hit it says Youve Been Stunned!

old Re: How to make stun grenade? [SOLVED]

KenVo
User Off Offline

Quote
Simply add msg2(id,"You Got Stunned") so it's:
1
2
3
4
5
6
7
8
9
10
11
12
addhook("hit","hitx")
function hitx(id,source,weapon,hpdmg,apdmg)
	if (weapon==51) then
		parse("speedmod "..id.." -20")
		msg2(id,"You Got Stunned")
		function speedx ()
		parse("speedmod "..id.." 0")
	end
		timer(3000,"speedx")
  end

end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview