Forum

> > CS2D > Scripts > Teleport to a player
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Teleport to a player

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Teleport to a player

HedShot
User Off Offline

Zitieren
Hi all!

I need a script that you can teleport players. Can you help me? Thanks in advance. I got this far, but it does not work:

1
2
3
4
5
addhook("say","asay")
addhook("sayteam","asay")

function asay(id,message)
 if message[1]=="!tp" then
And it stuck. (sorry for my english, I'm hungary)
1× editiert, zuletzt 22.03.13 20:29:56

alt Re: Teleport to a player

EP
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
addhook("say","asay")
addhook("sayteam","asay")

function asay(id,message)
	if message:lower():sub(1,3)=="!tp" then
		local pl = tonumber(message:sub(5,6)) or 0 
		if pl > 0 and player(pl,"exists") then
			parse("setpos "..id.." "..player(pl,"x").." "..player(pl,"y"))
		end		
		return 1
	end
end
I guess this works...
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht