All pastes #488623 Raw Edit

Untitled

public lua v1 · immutable
·published 2007-05-15 02:45 UTC
rendered paste body
door = {}start = {}function checkdoor()	for k,v in pairs(door) do		local sphere = ents.FindInSphere( v:GetPos(), 60 )		for k,v in pairs(sphere) do			//PrintTable(sphere)			if v:IsPlayer() then				print("v is player")				if v:IsAdmin() then					print("v is admin")					local user = v					user:PrintMessage(2,"You are allowed enter!")				else					findstart()					local user = v					for k,v in pairs(start) do						local startpos = v:GetPos()						user:SetPos(startpos)						//user:PrintMessage(2,"You arent allowed to enter being teleported to start!")					end				end			end		end	end	timer.Simple(.75,checkdoor)endtimer.Simple(3,checkdoor)function findstart()	local find = ents.FindByName("start")	PrintTable(find)	for k,v in pairs(find) do		table.insert(start,1,v)	endendfunction finddoor()	local find = ents.FindByName("door")	for k,v in pairs(find) do		//print("findings "..k..": "..v)		table.insert(door,v)	endendtimer.Simple(1,finddoor)