GoatseTimers = {}

function Goatse(userid)
	if GoatseTimers[userid] ~= nil then
		HaltTimer(GoatseTimers[userid])
	end
	_GModRect_Start("lm/lm")
	 _GModRect_SetPos(0, 0, 1, 1)
	 _GModRect_SetColor(1, 1, 1, 255)
	 _GModRect_SetTime(99999, 0, 0)
	_GModRect_Send(userid, 666)
	GoatseTimers[userid] = AddTimer(3, 0, CheckGoatse, userid)
end

function StopGoatse(userid)
	if GoatseTimers[userid] ~= nil then
		HaltTimer(GoatseTimers[userid])
		GoatseTimers[userid] = nil
	end
	_GModRect_Hide(userid, 666, 0, 0)
end

function CheckGoatse(userid)
	if _PlayerInfo(userid, "connected") then
		_PlaySoundPlayer(userid, "lm/lm.wav")
	else
		HaltTimer(GoatseTimers[userid])
		GoatseTimers[userid] = nil
	end
end
