Forum

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

English Teleport request ?

4 replies
To the start Previous 1 Next To the start

old Teleport request ?

Kirito2K
User Off Offline

Quote
Hi us , i got idea but i can't do it ..

The idea is making a cmd that make a teleport request for a player .

Example ..
Pirates killer : !tpr 2
(a msg has been sent for tp request sender says) "The request have been sent"

(a msg for player id 2 has been sent says) "Pirates would like to teleport to you,write !tpa to allow him to come , !tpd to deny the request"
Example ends ..

Best regards,
Pirates killer

old Re: Teleport request ?

Rainoth
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
person = {}
addhook("join","eh")
function eh(id)
	person[id] = 0
end

addhook("say","ehh")
function ehh(id,t)
	if t:sub(1,4) == "!ttp" then
		local target = t:sub(5,7)
		msg2(target,player(id,"name").." would like to teleport to you. Write '!tpa' to allow him to come")
		person[target] = id
		return 1
	elseif t:sub(1,4) == "!tpa" then
		if person[id] ~= 0 then
			parse("setpos "..person[id].." "..player(id,"x").." "..player(id,"y"))
			person[id] = 0
		end
		return 1
	end
end

Try. The rest is Copy-paste.

old Re: Teleport request ?

_oops
User Off Offline

Quote
More >

I made this very long time ago, so I'm not sure this script doesn't have any bugs
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview