!bring <id> player teleports to you!
!tp <id> You teleports to player
edited 1×, last 16.08.12 06:52:38 pm
function totable(t,match) 	local cmd = {} 	if not match then 		match = "[^%s]+" 	else 		match = "[^"..match.."]+" 	end 	for word in string.gmatch(t,match) do 		table.insert(cmd,word) 	end 	return cmd end addhook("say","teleport_say") function teleport_say(id,txt) 	local s = totable(txt) 	local t1 = tostring(s[1]) 	if t1 == "!bring" then 		local t2 = tonumber(s[2]) 		if t2 then 			if player(t2,"exists") then 				if player(id,"health") > 0 and if player(t2,"health") > 0 then 					parse("setpos "..t2.." "..player(id,"x").." "..player(id,"y")) 				end 			end 		end 	end 	if t1 == "!tp" then 		local t2 = tonumber(s[2]) 		if t2 then 			if player(t2,"exists") then 				if player(t2,"health") > 0 and player(id,"health") > 0 then 					parse("setpos "..id.." "..player(t2,"x").." "..player(t2,"y")) 				end 			end 		end 	end end