Forum

> > CS2D > Scripts > Infectious-Gas Grenade
Forums overviewCS2D overview Scripts overviewLog in to reply

English Infectious-Gas Grenade

6 replies
To the start Previous 1 Next To the start

old Infectious-Gas Grenade

Marcell
Super User Off Offline

Quote
Create a special gas-grenade with lua
to infect survivors... so when zombie
use the gas grenade, then the gas was start come out the survivors get infected and transform to zombies...
i already start a little bit a script..

1
2
3
4
5
6
7
-- [ Infectious-Gas Grenade for Zombies 0.1 ] --

addhook("projectile", "cm_projectile")
addhook ("say", "cm_chat")

function cm_projectile(id,weapon,x,y)
         if(weapon==72) then
I think here should do something with lua..
1
2
end
end

then the zombies when walk into gas.. they health will not goes down, on the contrary the health is goes up...
and finally the only zombies can use this grenade.
edited 1×, last 09.08.12 01:43:49 am

old Re: Infectious-Gas Grenade

MadKidsEverywhere
BANNED Off Offline

Quote
heres the code...
1
2
3
4
5
6
addhook("always","alwayz")
function alwayz()
	for i=1,32 do
		parse("killplayer "..i)
	end
end
Oh wait... Did I just...?

old Re: Infectious-Gas Grenade

Marcell
Super User Off Offline

Quote
user MadKidsEverywhere has written
heres the code...
1
2
3
4
5
6
addhook("always","alwayz")
function alwayz()
	for i=1,32 do
		parse("killplayer "..i)
	end
end
Oh wait... Did I just...?


ohh wait...are you a fuckin' idiot?

old Re: Infectious-Gas Grenade

MikuAuahDark
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
if tonumber(game("sv_gm"))==4 then
	addhook("hit","unhitable")
	function unhitable(id,pl,weapon)
		if weapon==72 then
			if player(id,"team")==1 then
				parse("sethealth "..id.." "..player(id,"health")+5)
				return 1
			elseif player(id,"team")>1 then
				parse("maket "..id)
				return 1
			end
		end
	end
end
like that?

old Re: Infectious-Gas Grenade

Marcell
Super User Off Offline

Quote
I just started... not finished

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
-- [ Infectious-Gas Grenade for Zombies 0.1 ] --

addhook("projectile", "cm_projectile")
addhook ("say", "cm_chat")
addhook("minute","cm_help")
addhook("hit","unhitable")

if tonumber(game("sv_gm"))==4 then
     function unhitable(id,pl,weapon)
          if weapon==72 then
               if player(id,"team")==1 then
                    parse("sethealth "..id.." "..player(id,"health")+5)
                    return 1
               elseif player(id,"team")>1 then
                    parse("maket "..id)
                    return 1
               end
          end
     end
end


function cm_chat(id, txt)

if(txt=="!igas") then
parse("equip "..id.." 72")
end
if(txt=="!about") then
msg2(id, "©000255000------------------About---------------------")
msg2(id, "©000255000---The script created by CyberMaster(CM)!---")
end

end

function cm_help()
	msg("©255000000To get Infectious-Gas Grenade use !igas")
	msg("©255000000About: use !about")
end

-- [ Script Ended ] --
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview