Forum

> > CS2D > Scripts > Teleport
Forums overviewCS2D overview Scripts overviewLog in to reply

English Teleport

6 replies
To the start Previous 1 Next To the start

old Teleport

SugarDaddy
User Off Offline

Quote
Hi all.

I need a this lua;

> If player move x,y
> Open Menu
> Select any option
> And teleport player

old Re: Teleport

GeoB99
Moderator Off Offline

Quote
Use Search you can find some threads related to it.
Here's the thread thread cs2d menu teleport that may help you otherwise just search, there have been tons of threads about this.

old Re: Teleport

G3tWr3ck3d
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- Tables --
positions = {
	pos_1 = {10,16}
} 

-- Hooks --
addhook("menu","_menu")
addhook("movetile","_movetile")

-- Functions --
function _menu(id,t,b)
	if t == "Teleport 1" then
        if b == 1 then
			parse("setpos "..id.." "..positions.pos_1[1]*32+16 .." "..positions.pos_1[2]*32+16)
		end
	end
end

function _movetile(id,x,y)
	if player(id,"tilex") == 10 and player(id,"tiley") == 8 then
		menu(id,"Teleport 1,First position")
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview