Forum

> > CS2D > Scripts > Infection Bomb not working ?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Infection Bomb not working ?

11 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Infection Bomb not working ?

_Vava_
User Off Offline

Zitieren
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

alt Re: Infection Bomb not working ?

Zeik
User Off Offline

Zitieren
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
1× editiert, zuletzt 21.08.14 01:33:48

alt Re: Infection Bomb not working ?

Infinite Rain
Reviewer Off Offline

Zitieren
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.

alt Re: Infection Bomb not working ?

Zeik
User Off Offline

Zitieren
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)
2× editiert, zuletzt 21.08.14 02:10:36
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht