Forum

> > CS2D > Scripts > Teleport request ?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Teleport request ?

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Teleport request ?

Kirito2K
User Off Offline

Zitieren
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

alt Re: Teleport request ?

Rainoth
Moderator Off Offline

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

alt Re: Teleport request ?

_oops
User Off Offline

Zitieren
Mehr >

I made this very long time ago, so I'm not sure this script doesn't have any bugs
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht