Forum

> > CS2D > Scripts > Infection Bomb not working ?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Infection Bomb not working ?

11 replies
To the start Previous 1 Next To the start

old Infection Bomb not working ?

_Vava_
User Off Offline

Quote
hello dear i have this code for my script and i don't now why it's not work correct please some one help me
1
2
3
4
5
6
7
8
9
10
11
addhook("hit","_hit")
function _hit(id,source,weapon)
if (weapon==86) then
	if player(source,"team")==1 then
	local p_x = player(id,"x")
	local p_y = player(id,"y")
	parse("spawnplayer "..id.." "..p_x.." "..p_y)
	parse("maket "..id)
	end
end
end
please help i need it for my server

old Re: Infection Bomb not working ?

_Vava_
User Off Offline

Quote
i change it but some time when i trow Gut bomb to Ct it kill teammate

and some time Ct die and turn zombie
i want custom kill

old Re: Infection Bomb not working ?

Zeik
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
addhook("hit","_hit")
function _hit(id,source,weapon)
     if (weapon==86) then
          if player(source,"team")==1 and player(id,"team")==2 then
               local p_x = player(id,"x")
               local p_y = player(id,"y")
               parse('customkill '..source..' '..item(weapon,"name")..' '..id)
               parse("maket "..id)
               parse("spawnplayer "..id.." "..p_x.." "..p_y)
          end
     end
end
edited 1×, last 21.08.14 01:33:48 am

old Re: Infection Bomb not working ?

Infinite Rain
Reviewer Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
addhook("hit","_hit")
function _hit(id,source,weapon)
     if (weapon==86) then
          if player(source,"team")==1 and player(id,"team")==2 then
               local p_x = player(id,"x")
               local p_y = player(id,"y")
               parse('customkill '..source..' '..itemtype(weapon,"name")..' '..id)
               parse("maket "..id)
               parse("spawnplayer "..id.." "..p_x.." "..p_y)
          end
     end
end
Try that.

old Re: Infection Bomb not working ?

_Vava_
User Off Offline

Quote
always the custom kill not work
but i have an idea i change wpndmg Gutbomb
and hook kill
when kill spawnplayer ...
it is good ?

old Re: Infection Bomb not working ?

Zeik
User Off Offline

Quote
I don't know why cs2d lua cmd item returns a boolean.. .-.

I tried it in the console and it always returns a boolean value, maybe the function is bugged?

Ah, the problem is that I misunderstood what the function is for (although I don't know what it does yet).

Anyway you can try with:
1
parse('customkill '..source..' "Gut Bomb" '..id)
edited 2×, last 21.08.14 02:10:36 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview