Forum

> > CS2D > Scripts > Barbed wire
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Barbed wire

22 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Barbed wire

mr-quick
User Off Offline

Zitieren
Help me ! Barbed wire is pressed, could make to the teleport back?

Sorry, My Bad English. Help me Pls!!

alt Re: Barbed wire

useigor
User Off Offline

Zitieren
user mr-quick, use portal gun. If you are admin then write this in console:
1
equip 1 88
1 - your ID.
88 - portal gun ID.

Portals much better than teleports.

alt Re: Barbed wire

mr-quick
User Off Offline

Zitieren
i Know . İ Searcing Go Barbed Wire and teleport back

have l4n biohazard lua to barbed wire..

alt Re: Barbed wire

Jela331
User Off Offline

Zitieren
He wants a script in which, when the player touches a barbed wire, the wire gets damaged and it teleports the player back. He can only pass when the barbed wire is destroyed.

alt Re: Barbed wire

mr-quick
User Off Offline

Zitieren
I need this script: when the player is on barbed wire he should be setpos to back.

alt Re: Barbed wire

Cure Pikachu
User Off Offline

Zitieren
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
function initArray(i,x,d)
	local array = {}
	if type(i) == "table" then
		array = i
		i = x
		x = d
	end
	if x == nil then
		x = 0
	end
	for m = 1 , i do
		if array[m] == nil then
			array[m] = x
		end
	end
	return array
end

prex = initArray(32)
prey = initArray(32)

addhook("join","nopass_reset")
addhook("leave","nopass_reset")
function nopass_reset(id)
	prex[id] = 0
	prey[id] = 0
end

addhook("movetile","nopass_movetile")
function nopass_movetile(id,x,y)
	for _, oid in ipairs(object(0,"table")) do
		if object(oid,"type") == 2 then
			if x == object(oid,"tilex") and y == object(oid,"tiley") then
				local px = prex[id]*32+16
				local py = prey[id]*32+16
				parse("setpos "..id.." "..px.." "..py)
				return
			end
		end
	end
	prex[id] = x
	prey[id] = y
end
Tested in my "test chamber" - Works way too effectively.

alt Re: Barbed wire

mr-quick
User Off Offline

Zitieren
Player musnt move 1 second after touch the barbed wire. Like stun help me pls

alt Re: Barbed wire

Cure Pikachu
User Off Offline

Zitieren
Here you go.
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
function initArray(i,x,d)
	local array = {}
	if type(i) == "table" then
		array = i
		i = x
		x = d
	end
	if x == nil then
		x = 0
	end
	for m = 1 , i do
		if array[m] == nil then
			array[m] = x
		end
	end
	return array
end

prex = initArray(32)
prey = initArray(32)
spd = initArray(32)

addhook("join","nopass_reset")
addhook("leave","nopass_reset")
function nopass_reset(id)
	prex[id] = 0
	prey[id] = 0
	spd[id] = 0
end

addhook("movetile","nopass_movetile")
function nopass_movetile(id,x,y)
	for _, oid in ipairs(object(0,"table")) do
		if object(oid,"type") == 2 then
			if x == object(oid,"tilex") and y == object(oid,"tiley") then
				local px = prex[id]*32+16
				local py = prey[id]*32+16
				parse("setpos "..id.." "..px.." "..py)
				parse("speedmod "..id.." -100")
				timer(1000,"parse","speedmod "..id.." "..spd[id])
				return
			end
		end
	end
	prex[id] = x
	prey[id] = y
	spd[id] = player(id,"speedmod")
end
Once again it's tested - It works.

alt Re: Barbed wire

mr-quick
User Off Offline

Zitieren
Pikachu You Amaizing LUA CODER! Thank YOU!

but add zombies only teleport back?

but does not work
2× editiert, zuletzt 30.01.13 11:33:57

alt Re: Barbed wire

Cure Pikachu
User Off Offline

Zitieren
Oh boy...
Code >

alt Re: Barbed wire

omg
User Off Offline

Zitieren
wtf..."but does not work" could mean anything. if it worked for pika, be more specific

alt Re: Barbed wire

mr-quick
User Off Offline

Zitieren
can't not move after pressing is the have problem.

PLS HELP ME !! >
1× editiert, zuletzt 01.02.13 16:03:57
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht